Quectel AG35 SMTP At Command Manual

Quectel AG35 SMTP At Command Manual

Lte module

Advertisement

AG35 SMTP
AT Commands Manual
LTE Module Series
Rev. AG35_SMTP_AT_Commands_Manual_V1.0
Date: 2017-10-13
www.quectel.com

Advertisement

Table of Contents
loading

Summary of Contents for Quectel AG35 SMTP

  • Page 1 AG35 SMTP AT Commands Manual LTE Module Series Rev. AG35_SMTP_AT_Commands_Manual_V1.0 Date: 2017-10-13 www.quectel.com...
  • Page 2 QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR RELIANCE UPON THE INFORMATION.
  • Page 3: About The Document

    LTE Module Series AG35 SMTP AT Commands Manual About the Document History Revision Date Author Description Chris PENG/ 2017-10-13 Initial Mandy WANG AG35_SMTP_AT_Commands_Manual Confidential / Released 2 / 30...
  • Page 4: Table Of Contents

    LTE Module Series AG35 SMTP AT Commands Manual Contents About the Document ........................... 2 Contents ............................... 3 Table Index ..............................4 Introduction ............................5 1.1. Introduction about SSL Type ....................5 1.2. The Process of Sending Email ....................5 1.3.
  • Page 5 LTE Module Series AG35 SMTP AT Commands Manual Table Index TABLE 1: SUMMARY OF ERROR CODES ...................... 26 TABLE 2: SUMMARY OF SMTP PROTOCOL ERROR CODES ..............28 TABLE 3: RELATED DOCUMENTS ........................30 TABLE 4: TERMS AND ABBREVIATIONS ......................30...
  • Page 6: Introduction

    SMTP server depends on mail service provider, and it is the port 25, 465 or 587 usually. 1.2. The Process of Sending Email As AG35 supports SMTP protocol, customers can send emails easily by AG35 SMTP AT commands. The general process is as follows: Step 1: Configure and activate a PDP context.
  • Page 7 LTE Module Series AG35 SMTP AT Commands Manual If QoS settings need to be updated, configure them by AT+CGQMIN, AT+CGEQMIN, AT+CGQREQ AT+CGEQREQ commands. more details, please refer Quectel_AG35_AT_Commands_Manual. Activate the PDP context by AT+QIACT. contextid”,<contextID>. “ Configure the PDP context ID for SMTP by AT+QSMTPCFG= Step 2: Configure SMTP server and user account.
  • Page 8: Description Of Data Mode

    LTE Module Series AG35 SMTP AT Commands Manual 1.3. Description of Data Mode The COM port of AG35 module has two working modes: AT command mode and data mode. In AT command mode, the inputted data via COM port will be treated as AT command, while in data mode, it will be treated as data.
  • Page 9: Description Of Smtp At Commands

    LTE Module Series AG35 SMTP AT Commands Manual Description of SMTP AT Commands 2.1. AT+QSMTPCFG Configure Parameters for SMTP Server The command is used to configure SMTP server, user account and SSL settings. If the Write Command only executes one parameter, it will query the current settings.
  • Page 10 LTE Module Series AG35 SMTP AT Commands Manual +QSMTPCFG: “sender”,<sender_name>,<sender_email> Write Command Response AT+QSMTPCFG=“smtpserver”[,<srva If <srvaddr> and <srvport> are not omitted: ddr>,<srvport>] +CME ERROR: <err> If <srvaddr> and <srvport> are both omitted, query the current settings: +QSMTPCFG: “smtpserver”,<srvaddr>,<srvport> Write Command Response AT+QSMTPCFG=“contextid”[,<conte...
  • Page 11: At+Qsmtpdst Add Or Delete Recipients

    LTE Module Series AG35 SMTP AT Commands Manual Parameter <username> String type. The user name for authentication. The maximum size of the parameter is 50 bytes. <password> String type. The password for authentication. The maximum size of the parameter is 50 bytes.
  • Page 12 LTE Module Series AG35 SMTP AT Commands Manual Write Command Response AT+QSMTPDST=<mode>[,<type>[,<e If the format is correct and it is not sending an email: mailaddr>]] +CME ERROR: <err> Parameter <mode> Integer type. Add or delete recipients. Delete <type> Integer type. The type of recipients.
  • Page 13: At+Qsmtpsub Edit The Subject Of An Email

    LTE Module Series AG35 SMTP AT Commands Manual 2.3. AT+QSMTPSUB Edit the Subject of an Email The command is used to edit the subject of an email. If <charset> is not ASCII, the inputted data should be the hex string of the original subject.
  • Page 14: At+Qsmtpbody Edit The Body Of An Email

    LTE Module Series AG35 SMTP AT Commands Manual //Add subject for email and the <charset> is UTF8. “7465737420534D5450” is the hex string of “TEST SMTP”. AT+QSMTPSUB=1,"7465737420534D5450" //Edit subject and the character set is 1 which means UTF8. AT+QSMTPSUB? //Query subject of the email.
  • Page 15 LTE Module Series AG35 SMTP AT Commands Manual UTF-8 GB2312 BIG5 <body_length> Integer type. The specific length of body. If the length of inputted data is less than the specific value <body_length>, customers can exit from data mode by “+++”. The actual length of the body is the inputted data length.
  • Page 16: At+Qsmtpatt Add Or Delete Attachments For An Email

    LTE Module Series AG35 SMTP AT Commands Manual +QSMTPBODY: 90 2.5. AT+QSMTPATT Add or Delete Attachments for an Email Attachments for email can be added by AT+QSMTPATT=1. When adding an attachment, the file index should be specified. As a result, different attachments should have different file index. The maximum number of attachments is 10.
  • Page 17: At+Qsmtpclr Clear The Content Of An Email

    LTE Module Series AG35 SMTP AT Commands Manual <file_size> Integer type. The size of the attachment. Unit: byte. <err> Integer type. The error code of the operation. Please refer to Chapter 5. Example //Customers can add attachments from RAM. After the email is sent, the file uploaded to RAM should be deleted by AT+QFDEL.
  • Page 18: At+Qsmtpput Send An Email

    LTE Module Series AG35 SMTP AT Commands Manual Execution Command Response AT+QSMTPCLR +CME ERROR: <err> Parameter <err> Integer type. The error code of the operation. Please refer to Chapter 5. Example AT+QSMTPCLR //Clear the recipients, subject, body and attachments for the email.
  • Page 19 LTE Module Series AG35 SMTP AT Commands Manual If there is any error, response: +CME ERROR: <err> Parameter <timeout> Integer type. The maximum time to send an email. The range is 60-65535. Unit: second. <err> Integer type. The error code of the operation. Please refer to Chapter 5. If it is 0, it means the operation is successful.
  • Page 20: Examples

    LTE Module Series AG35 SMTP AT Commands Manual Examples 3.1. Send an Email without SSL Sending an email without SSL means that SSL function will not be used, and the email will be sent with insecure connection. For example: //Step 1: Configure and activate the PDP context.
  • Page 21 LTE Module Series AG35 SMTP AT Commands Manual //Step 3: Edit the email content. AT+QSMTPDST=1,1,“quectel_test@163.com” //Add the recipient and the recipient type is 1 which means all recipients. AT+QSMTPDST=1,2,“quectel_test@21cn.com” //Add the recipient and the recipient type is 2 which means CC recipients.
  • Page 22: Send An Email With Ssl

    LTE Module Series AG35 SMTP AT Commands Manual AT+QSMTPATT? //Query the attachment. +QSMTPATT: 1, “RAM:smtp1.txt”,100 //Step 4: Send the email. AT+QSMTPPUT=300 //Send the email and the maximum time is 300s. //It may take a few minutes. +QSMTPPUT: 0,0 //Send email successfully. If <err> is not 0, you can...
  • Page 23: Send An Email With Starttls

    LTE Module Series AG35 SMTP AT Commands Manual AT+QSSLCFG="seclevel",1,0 //Configure SSL security level as 0 which means the SSL CA certificate is not needed. AT+QSSLCFG="sslversion",1,1 //Configure SSL version as 1 which means TLS1.0. //Configure SMTP server. AT+QSMTPCFG="smtpserver","smtp.163.com",25 //Set SMTP server address and port.
  • Page 24 LTE Module Series AG35 SMTP AT Commands Manual //Configure SMTP server. AT+QSMTPCFG="smtpserver","smtp.163.com",25 //Set SMTP server address and port. //As the SMTP server is different, the account information will be different as well. As an example, the following information is provided.
  • Page 25: Error Handling

    LTE Module Series AG35 SMTP AT Commands Manual Error Handling 4.1. Executing SMTP AT Command Fails When executing SMTP AT commands, if response “ERROR” is received from the module, please check whether the (U)SIM card is inserted, and whether it is “+CPIN: READY” returned when executing AT+CPIN?.
  • Page 26: Error Response Of At+Qsmtpput

    LTE Module Series AG35 SMTP AT Commands Manual Make sure the domain name of SMTP server is valid. Query the status of PDP context by AT+QIACT? command to make sure the specified PDP context has been activated successfully. 4.4. Error Response of AT+QSMTPPUT “+QSMTPPUT: <err>,<protocol_error>”...
  • Page 27: Summary Of Error Codes

    LTE Module Series AG35 SMTP AT Commands Manual Summary of Error Codes The error code <err> indicates an error related to mobile equipment or network. The details about <err> are described in the following table. Table 1: Summary of Error Codes <err>...
  • Page 28 LTE Module Series AG35 SMTP AT Commands Manual Requested mail action not taken: mailbox unavailable Requested action aborted: local error in processing Requested action not taken: insufficient system storage Syntax error, command unrecognized Syntax error in parameters or arguments Command not implemented...
  • Page 29: Summary Of Smtp Protocol Error Codes

    LTE Module Series AG35 SMTP AT Commands Manual Summary of SMTP Protocol Error Codes The protocol error code <protocol_error> indicates an error replied from SMTP server. Please refer to RFC2821 (Simple Mail Transfer Protocol). The details about <protocol_error> are described in the following table.
  • Page 30 LTE Module Series AG35 SMTP AT Commands Manual Requested action not taken: mailbox name not allowed Transaction failed AG35_SMTP_AT_Commands_Manual Confidential / Released 29 / 30...
  • Page 31: Appendix A References

    LTE Module Series AG35 SMTP AT Commands Manual Appendix A References Table 3: Related Documents Document Name Remark RFC2821 Simple Mail Transfer Protocol SMTP service extension for secure SMTP RFC3207 over transport layer security Quectel_AG35_TCP(IP)_AT_Commands_ Introduction about AG35 TCP/IP Manual...

Table of Contents