AG35
SMTP
AT Commands Manual
LTE Module Series
Rev. AG35_SMTP_AT_Commands_Manual_V1.0
Date: 2017-10-13
www.quectel.com
Страница 1: ...AG35 SMTP AT Commands Manual LTE Module Series Rev AG35_SMTP_AT_Commands_Manual_V1 0 Date 2017 10 13 www quectel com...
Страница 2: ...OMERS 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...
Страница 3: ...ies AG35 SMTP AT Commands Manual AG35_SMTP_AT_Commands_Manual Confidential Released 2 30 About the Document History Revision Date Author Description 1 0 2017 10 13 Chris PENG Mandy WANG Initial Quecte...
Страница 4: ...2 3 AT QSMTPSUB Edit the Subject of an Email 12 2 4 AT QSMTPBODY Edit the Body of an Email 13 2 5 AT QSMTPATT Add or Delete Attachments for an Email 15 2 6 AT QSMTPCLR Clear the Content of an Email 16...
Страница 5: ...anual AG35_SMTP_AT_Commands_Manual Confidential Released 4 30 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 A...
Страница 6: ...ith insecure connection The port of SMTP server depends on mail service provider and it is the port 25 usually 2 If ssltype is 1 it means SSL In this case emails are sent with SSL TLS encrypted SMTP T...
Страница 7: ...e the recipient email address by AT QSMTPDST 2 Configure the subject of email by AT QSMTPSUB 3 Configure the body of email by AT QSMTPBODY 4 Add attachments for the email by AT QSMTPATT The attachment...
Страница 8: ...be followed 1 Do not input any character within 1s or longer before inputting 2 Input within 1s and no other characters can be inputted during the time 3 Do not input any character within 1s after has...
Страница 9: ...FG account username password QSMTPCFG sender sender_name sender_email QSMTPCFG smtpserver srvaddr srvport QSMTPCFG contextid 1 16 QSMTPCFG sslctxid 0 5 QSMTPCFG ssltype 0 2 OK Write Command AT QSMTPCF...
Страница 10: ...ort OK Write Command AT QSMTPCFG contextid conte xtID Response If contextID is not omitted OK Or CME ERROR err If contextID is omitted query the current settings QSMTPCFG contextid contextID OK Write...
Страница 11: ...e PDP context ID The range is 1 16 and the default value is 1 It should be activated by AT QIACT before sending an email For details please refer to Quectel_AG35_TCP IP _AT_Commands_Manual sslctxID In...
Страница 12: ...aol com QSMTPDST 2 quectel_test 21cn com OK Delete all recipients AT QSMTPDST 0 Delete all recipients OK AT QSMTPDST OK Write Command AT QSMTPDST mode type e mailaddr Response If the format is correc...
Страница 13: ...mail Test Command AT QSMTPSUB Response QSMTPSUB 0 3 subject OK Read Command AT QSMTPSUB Response QSMTPSUB charset subject OK Write Command AT QSMTPSUB charset subject Response OK Or CME ERROR err char...
Страница 14: ...y_length or the time reaches input_time the module will exit from data mode automatically If the inputted data is less than the body_length customers can finish editing body by inputting or changing D...
Страница 15: ...s AT QSMTPBODY 0 100 120 Edit email body The character set is 0 which means ASCII and the maximum input length is 100 bytes and the maximum input time is 120s CONNECT Input 100 bytes data Input 100 by...
Страница 16: ...be deleted by AT QFDEL For more details of these commands please refer to Quectel_AG35_FILE_Application_Note The mail service provider may have some restriction on single file size and total size AT...
Страница 17: ...data QFUPL 200 707 OK AT QFLST RAM QFLST RAM test txt 200 OK AT QSMTPATT 1 1 RAM test txt Add an attachment for email and the file index is 1 OK AT QSMTPATT Query the attachments QSMTPATT 1 RAM test t...
Страница 18: ...which depends on the total size of attachments and network status Customers should not send email again before receiving QSMTPPUT err protocol_error which indicates the ending of sending an email If e...
Страница 19: ...PPUT timeout directly If there is any error response CME ERROR err 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 opera...
Страница 20: ...1 1 10 7 157 1 OK AT QSMTPCFG contextid 1 Set the PDP context ID as 1 The PDP context ID must be activated first OK Step 2 Configure SMTP server and user account AT QSMTPCFG ssltype 0 Set the SSL type...
Страница 21: ...ns ASCII OK AT QSMTPSUB Query the subject of email QSMTPSUB 0 TEST SMTP OK AT QSMTPBODY 0 100 120 Edit email body The character set is 0 which means ASCII The maximum input length is 100 bytes and the...
Страница 22: ...p 4 to re send emails Of course you can also repeat Step 2 to Step 4 to re send emails AT QIDEACT 1 Deactivate the PDP context which is activated for SMTP OK 3 2 Send an Email with SSL Sending an emai...
Страница 23: ...ss OK 3 3 Send an Email with STARTTLS Sending an email with STARTTLS means that the normal insecure connection will be upgraded to secure one through STARTTLS function thus for sending the mail data I...
Страница 24: ...om 25 Set SMTP server address and port OK As the SMTP server is different the account information will be different as well As an example the following information is provided AT QSMTPCFG account sish...
Страница 25: ...egistered 3 Query the PDP context parameters by AT QICSGP command and make sure the APN of specified PDP context has been set 4 Make sure the specified PDP context ID is neither used by PPP nor activa...
Страница 26: ...ot successful please deactivate the PDP context by AT QIDEACT and re activate the PDP context by AT QIACT to resolve this issue If activating the PDP context fails please refer to Chapter 4 2 to resol...
Страница 27: ...g to the domain name 654 Network error such as failed to activate GPRS CSD context failed to establish the TCP connection with the SMTP server or failed to send an email to the SMTP server etc 655 Uns...
Страница 28: ...d unrecognized 671 Syntax error in parameters or arguments 672 Command not implemented 673 Bad sequence of commands 674 Command parameter not implemented 675 domain does not accept mail see RFC1846 67...
Страница 29: ...e closing transmission channel 450 Requested mail action not taken mailbox unavailable 451 Requested action aborted local error in processing 452 Requested action not taken insufficient system storage...
Страница 30: ...E Module Series AG35 SMTP AT Commands Manual AG35_SMTP_AT_Commands_Manual Confidential Released 29 30 553 Requested action not taken mailbox name not allowed 554 Transaction failed Quectel Confidentia...
Страница 31: ...col SMTP Simple Mail Transfer Protocol SSL Security Socket Layer TLS Transport Layer Security SN Document Name Remark 1 RFC2821 Simple Mail Transfer Protocol 2 RFC3207 SMTP service extension for secur...