LTE Module Series
EC2x&EG9x&EM05 SMTP AT Commands Manual
EC2x&EG9x&EM05_SMTP_AT_Commands_Manual 21 / 31
OK
AT+QSMTPATT?
//Query the attachment.
+QSMTPATT: 1,"RAM:smtp1.txt",100
OK
//Step 4: Send the email.
AT+QSMTPPUT=300
//Send the email and the maximum time is 300s.
OK
//It may take a few minutes.
+QSMTPPUT: 0,0
//Send email successfully. If <err> is not 0, then the
can
be
resent
by
executing
AT+QSMTPPUT=<timeout> directly.
//Step 5: Clear the email content and deactivate the PDP context.
AT+QSMTPCLR
//Clear recipients, subject, body and attachments.
OK
AT+QFDEL="RAM:smtp.txt"
//Delete the file as attachment.
OK
//Customers can 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 with SSL
Sending an email with SSL means that emails will be sent over SSL/TLS encrypted SMTP. The port of
SMTP server depends on the mail service provider, and it is the port 465 or 587 usually. As compared
with sending email without SSL, sending email over SSL additionally needs SMTP server and user
account configuration.
//Configure SSL type.
AT+QSMTPCFG="ssltype",1
//Set the SSL type as 1, which means emails
will be sent over SSL.
OK
AT+QSMTPCFG="sslctxid",1
//Choose SSL context 1 for SMTP.
OK
AT+QSSLCFG="ciphersuite",1,0xffff
//Configure SSL cipher suite type as 0xffff,
which means all cipher suite types will be