background image

                                                                                                                                           

LTE  Module  Series 

                                                                                  EC2x&EG9x&EM05  SMTP  AT  Commands  Manual

 

 

EC2x&EG9x&EM05_SMTP_AT_Commands_Manual                                                                          7 / 31 

   
 

 

Step 5: Clear the email content.

 

AT+QSMTPCLR will clear the  email content configured  in 

Step 3

. The attached files should be 

deleted  by  AT+QFDEL.  For  more  details  of  these  commands,  please  refer  to 

Quectel_EC2x&EG9x&EM05_FILE_AT_Commands_Manual

.  Then  repeat 

Step  3

  and 

4

.  If  the 

SMTP server information and user information need to be changed, then 

Step 2

 to 

Step 4

 should 

be repeated.   

 

If emails have not been sent for a long time, such as  30 minutes or even longer, then the PDP 

context  should  be  deactivated  by  AT+QIDEACT=<contextID>.  For more  details,  please  refer  to 

Quectel_EC2x&EG9x&EM05_TCP(IP)_AT_Commands_Manual

 

1.3. Description of Data Mode 

 

The  COM  port  of  EC2x&EG9x&EM05  modules  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. 

 

Inputting 

“+++” or pulling up DTR (AT&D1 should be set first) can make the module exit from data mode. 

To 

prevent the “+++” from being misinterpreted as data, the following sequence should 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 af

ter “+++” has been inputted. 

 

When AT+QSMTPBODY is executed, the COM port will enter into data mode. All inputted data will be the 

body of email. If the inputted data reaches the <body_length> or the time reaches <input_time>, the port 

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 DTR level from low to high before <input_time> reaches. 
In such case, the COM port cannot reenter data mode by executing ATO command. 

 

 

 

 

 

 

 

 

Summary of Contents for EC2 Series

Page 1: ...EC2x EG9x EM05 SMTP AT Commands Manual LTE Module Series Rev EC2x EG9x EM05_SMTP_AT_Commands_Manual_V1 0 Date 2017 12 08 Status Released www quectel com...

Page 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...

Page 3: ...E Module Series EC2x EG9x EM05 SMTP AT Commands Manual EC2x EG9x EM05_SMTP_AT_Commands_Manual 2 31 About the Document History Revision Date Author Description 1 0 2017 12 08 Duke XIN Haley HUANG Initi...

Page 4: ...ients 10 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...

Page 5: ...M05 SMTP AT Commands Manual EC2x EG9x EM05_SMTP_AT_Commands_Manual 4 31 Table Index TABLE 1 SUMMARY OF ERROR CODES 26 TABLE 2 SUMMARY OF SMTP PROTOCOL ERROR CODES 28 TABLE 3 RELATED DOCUMENTS 30 TABLE...

Page 6: ...of them Customers can choose one kind according to the mail service provider These three kinds of connections can be set by ssltype parameter in AT QSMTPCFG ssltype 1 If ssltype is 0 it means without...

Page 7: ...y AT QSMTPCFG sslctxid sslctxID and configure the sslctxID by AT QSSLCFG ciphersuite sslctxID ciphersuites For more details about these commands please refer to Quectel_EC2x EG9x EM05_SSL_AT_ Commands...

Page 8: ...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 Inputting or pulling up DTR AT D1 should be set first c...

Page 9: ...se QSMTPCFG 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 A...

Page 10: ...addr srvport 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...

Page 11: ...he 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_EC2x EG9x EM05_TCP IP _AT_Commands_Manual...

Page 12: ...tel_test aol com QSMTPDST 2 quectel_test 21cn com OK Delete all recipients AT QSMTPDST 0 Delete all recipients OK AT QSMTPDST OK OK Write Command AT QSMTPDST mode type e mailaddr Response If the forma...

Page 13: ...t of an Email 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...

Page 14: ...s the body_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 c...

Page 15: ...0 bytes 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...

Page 16: ...ould be deleted by AT QFDEL For more details of these commands please refer to Quectel_EC2x EG9x EM05_FILE_AT_Commands_Manual The mail service provider may have some restriction on single file size an...

Page 17: ...ectel_EC2x EG9x EM05_FILE_AT_ Commands_Manual CONNECT Input 200 bytes 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...

Page 18: ...l to be completely sent 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...

Page 19: ...the format is correct and it is not sending an email OK QSMTPPUT err protocol_error If there is any error response CME ERROR err timeout Integer type The maximum time to send an email The range is 60...

Page 20: ...t QIACT 1 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 th...

Page 21: ...means 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...

Page 22: ...repeat Step 3 and Step 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 wit...

Page 23: ...and sender address 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...

Page 24: ...smtp 163 com 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 a...

Page 25: ...ain status by AT CGREG command and make sure the PS domain has been registered 3 Query the PDP context parameters by AT QICSGP command and make sure the APN of specified PDP context has been set 4 Mak...

Page 26: ...icates the sending is failed Please resend the email If resending is not successful please deactivate the PDP context by AT QIDEACT and re activate the PDP context by AT QIACT to resolve this issue If...

Page 27: ...s according 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 e...

Page 28: ...or command 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 R...

Page 29: ...available 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 syste...

Page 30: ...LTE Module Series EC2x EG9x EM05 SMTP AT Commands Manual EC2x EG9x EM05_SMTP_AT_Commands_Manual 29 31 553 Requested action not taken mailbox name not allowed 554 Transaction failed...

Page 31: ...mark 1 RFC2821 Simple Mail Transfer Protocol 2 RFC3207 SMTP service extension for secure SMTP over transport layer security 3 Quectel_EC2x EG9x EM05_TCP IP _AT_ Commands_Manual Introduction about EC2x...

Page 32: ...LTE Module Series EC2x EG9x EM05 SMTP AT Commands Manual EC2x EG9x EM05_SMTP_AT_Commands_Manual 31 31 SSL Security Socket Layer TLS Transport Layer Security...

Reviews: