Professional Documents
Culture Documents
Note_V1.10
Smart Machine Smart Decision
Version: 1.10
Date: 2015-02-03
Status: Release
General Notes
SIMCom offers this information as a service to its customers, to support application and
engineering efforts that use the products designed by SIMCom. The information provided is based
upon requirements specifically provided to SIMCom by the customers. SIMCom has not
undertaken any independent search for additional relevant information, including any information
that may be in the customer’s possession. Furthermore, system validation of this product designed
by SIMCom within a larger electronic system remains the responsibility of the customer or the
customer’s system integrator. All specifications supplied herein are subject to change.
Copyright
This document contains proprietary technical information which is the property of SIMCom
Limited., copying of this document and giving it to others and the using or communication of the
contents thereof, are forbidden without express authority. Offenders are liable to the payment of
damages. All rights reserved in the event of grant of a patent or the registration of a utility model
or design. All specification supplied herein are subject to change without notice at any time.
Contents
1 Introduction............................................................................................................................... 5
1.1 Features........................................................................................................................... 5
2 AT commands............................................................................................................................ 6
3 Examples.................................................................................................................................... 6
3.1 Bearer profile.................................................................................................................. 7
3.2 Send an Email................................................................................................................. 7
3.3 Send a UTF-8 Email....................................................................................................... 8
3.4 Abort Email Sending.......................................................................................................9
3.5 Retrieve an Email............................................................................................................9
3.6 Retrieve and Delete an Email....................................................................................... 10
3.7 Abort an Email Retrieve............................................................................................... 12
3.8 Read an Email body in EFS.......................................................................................... 13
Appendix.......................................................................................................................................... 14
A Related Documents...........................................................................................................14
B Terms and Abbreviations..................................................................................................14
Version History
Date Version Description of change Author
2011-11-09 V1.00 New version weiyingfei
2013-12-26 V1.10 Rewrite using new document template songjin
Scope
This document presents the AT command of EMAIL operation and application examples. This
document can apply to SIMCom 3G modules, including
SIM5218/SIM5215/SIM5216/SIM5320/SIM5310/SIM6320/SIM6216 series modules.
1 Introduction
This document presents the AT command of Email operation for SIMCom 3G modules.
1.1 Features
1. SIMCom 3G series supports to send an Email with an attachment via SMTP protocol. It
also supports carbon copy (abbreviated Cc:) recipient and blind carbon copy
(abbreviated Bcc:) recipient.
2. SIMCom 3G series supports to retrieve and delete the Email via POP3 protocol, the
Email may be with attachments.
3. SIMCom 3G series supports all of POP3 commands but APOP. By these POP3
commands, you can get the specific Email’s size and header.
4. SIMCom 3G series does not support that SMTP and POP3 operations are executed at
the same time.
2 AT commands
Below is the email associated with AT commands, detailed information please refer to
document [1].
Through these AT commands can achieve the following functions.
1) Via the SMTP protocol to send e-mail with attachments.
2) Through the POP3 protocol to accept or delete e-mail.
3) To obtain the specified mail message (size and header).
Command Description
AT+SMTPSRV Set SMTP Server Address and Port
AT+SMTPAUTH Set User Name and Password for SMTP Authentication
AT+SMTPFROM Set Sender Address and Name
AT+SMTPRCPT Set the Email Recipient(TO/CC/BCC) Address and Name
AT+SMTPSUB Set the Email Subject
AT+SMTPBODY Set the Email Body
AT+SMTPBCH Set the Email Body Character Set
AT+SMTPFILE Set the Email Attachment
AT+SMTPSEND Send the Email
AT+SMTPSTOP Stop SMTP Sending
AT+POP3SRV Set POP3 Server and Account
AT+POP3IN Log In POP3 Server
AT+POP3NUM Get Email Number and Total Size
AT+POP3LIST Get the Specific Email Size
AT+POP3HDR Get the Specific Email Header
AT+POP3GET Download Email Content to EFS
AT+POP3READ Read an Email from EFS.
AT+POP3DEL Mark the Specific Email to Delete
AT+POP3STOP Force to stop receiving Email and Close the Session
AT+POP3OUT Log Out POP3 Server
3 Examples
SIMCom_3G_EMAIL_Application Note _V1.10 6 2015-02-03
Smart Machine Smart Decision
In the "Grammar" columns of following tables, input of AT commands are in black , module
return values are in blue.
Grammar Description
AT+CGSOCKCONT=1,"IP","apn" Configure bearer profile 1
OK
AT+CSOCKSETPN=1
OK
Grammar Description
AT+SMTPSRV="mail.sim.com",25 Set SMTP server address and port
OK
AT+SMTPAUTH=1,"john","123456" Set user name and password
OK
AT+SMTPFROM="john@sim.com","john" Set sender address and name
OK
AT+SMTPRCPT=0,0,"john@sim.com","john" Set the recipient(To:)
OK
AT+SMTPRCPT=1,0,"john@sim.com","john" Set the recipient(Cc:)
OK
AT+SMTPRCPT=2,0,"john@sim.com","john" Set the recipient(Bcc:)
OK
AT+SMTPSUB="Test" Set the subject
AT+SMTPBODY="This is my test mail" Set the body
OK
AT+FSCD=C:/Picture Switch to C:/Picture directory
+FSCD: C:/Picture
OK
AT+FSLS List files under C:/Picture directory
+FSLS: FILES:
20100202_100006.jpg
20100202_100016.jpg
OK
+SMTP: SUCCESS
Grammar Description
AT+SMTPSRV="mail.sim.com",25 Set SMTP server address and port
OK
AT+SMTPAUTH=1,"john","123456" Set user name and password
OK
AT+SMTPFROM="john@sim.com","john" Set sender address and name
OK
AT+SMTPRCPT=0,0,"john@sim.com","john" Set the recipient(To:)
OK
AT+SMTPRCPT=1,0,"john@sim.com","john" Set the recipient(Cc:)
OK
AT+SMTPRCPT=2,0,"john@sim.com","john" Set the recipient(Bcc:)
OK
AT+SMTPSUB={non-ascii}"E6B58BE8AF95E982AE Set the utf-8 subject
E4BBB6"
AT+SMTPBODY Set the body of UTF-8 format
> … //utf-8 format stirng<Ctrl+Z>
OK
AT+SMTPBCH="utf-8" Set the email body character set
OK
AT+FSCD=C:/Picture Switch to C:/Picture directory
+FSCD: C:/Picture
OK
AT+FSLS List files under C:/Picture directory
+FSLS: FILES:
20100202_100006.jpg
20100202_100016.jpg
OK
AT+SMTPFILE=1,"20100202_100006.jpg" Add attachment
OK
AT+SMTPFILE=2,"20100202_100016.jpg" Add attachment
OK
AT+SMTPSEND Send the Email
+SMTP: OK
OK
+SMTP: SUCCESS
Grammar Description
AT+SMTPSEND Use AT+SMTPSTOP to cancel
+SMTP: OK sending mail
OK
AT+SMTPSTOP
OK
+SMTP: USER CANCEL
Grammar Description
AT+POP3SRV="pop3.server.com","un","pwd",110 Set POP3 server and login parameters
OK
AT+POP3IN Login POP3 server
+POP3: SUCCESS
OK
AT+POP3NUM Check total number of email on POP3
+POP3: 2 2134 server
OK
AT+POP3LIST=1 Check the first mail size
+POP3: 1, 1050
OK
AT+POP3HDR=1 Check the first mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:11:30 +0800
OK
AT+POP3LIST=2 Check the second mail size
+POP3: 2, 1084
OK
AT+POP3HDR=2 Check the second mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:16:27 +0800
Subject: Second Test Email
OK
AT+POP3GET=1 Retrieve the first mail
OK
+POP3: SUCCESS
C:/Email/100202110457/, EMAIL000.TXT
AT+POP3READ Read the mail body that has just been
Date: Tue, 9 Mar 2010 17:11:30 +0800 downloaded using AT+POP3GET
From: "FromName" <FromAddr@server.com>
To: "ToName" <ToAddr@server.com>
Subject: First Test Email
OK
AT+POP3OUT Logout the POP3 server
+POP3: SUCCESS
OK
Grammar Description
AT+POP3SRV="pop3.server.com","un","pwd",110 Set POP3 server and login parameters
OK
AT+POP3IN Login POP3 server
+POP3: SUCCESS
OK
AT+POP3NUM Check total number of email on POP3
OK
AT+POP3LIST=1 Check the first mail size
+POP3: 1, 1050
OK
AT+POP3HDR=1 Check the first mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:11:30 +0800
Subject: First Test Email
OK
AT+POP3LIST=2 Check the second mail size
+POP3: 2, 1084
OK
AT+POP3HDR=2 Check the second mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:16:27 +0800
Subject: Second Test Email
OK
AT+POP3GET=1 Retrieve the first mail
OK
+POP3: SUCCESS
C:/Email/100202110457/, EMAIL000.TXT
AT+POP3READ Read the mail body that has just been
Date: Tue, 9 Mar 2010 17:11:30 +0800 downloaded using AT+POP3GET
From: "FromName" <FromAddr@server.com>
To: "ToName" <ToAddr@server.com>
Subject: First Test Email
OK
AT+POP3DEL=1 Delete the first mail
+POP3: SUCCESS
OK
AT+POP3OUT Logout the POP3 server
+POP3: SUCCESS
OK
Grammar Description
AT+POP3SRV="pop3.server.com","un","pwd",110 Set POP3 server and login parameters
OK
AT+POP3IN Login POP3 server
+POP3: SUCCESS
OK
AT+POP3NUM Check total number of email on POP3
+POP3: 2 2134 server
OK
AT+POP3LIST=1 Check the first mail size
+POP3: 1, 1050
OK
AT+POP3HDR=1 Check the first mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:11:30 +0800
Subject: First Test Email
OK
AT+POP3LIST=2 Check the second mail size
+POP3: 2, 1084
OK
AT+POP3HDR=2 Check the second mail header
From: "FromName" <FromAddr@server.com>
Date: Tue, 9 Mar 2010 17:16:27 +0800
Subject: Second Test Email
OK
AT+POP3GET=1 Try to retrieve the first mail
OK
AT+POP3STOP Stop the retrieve operation and close
OK the session
Grammar Description
AT+FSCD=C:/Email Switch to C:/Email directory
+FSCD: C:/Email
OK
AT+FSLS List how many mails has been
+FSLS: SUBDIRECTORIES: downloaded to EFS
100202110457
100202113456
OK
AT+POP3READ=0,"100202110457/EMAIL000.TXT" Read mail body content
Date: Tue, 9 Mar 2010 17:11:30 +0800
From: "FromName" <FromAddr@server.com>
To: "FromName" <ToAddr@server.com>
Subject: First Test Email
OK
Appendix
A Related Documents
Abbreviation Description
GPRS General Packet Radio Service
IP Internet Protocol
EMAIL Electronic Mail
SMTP Simple Mail Transfer Protocol
POP3 Post Office Protocol 3
Contact us:
Shanghai SIMCom Wireless Solutions Co.,Ltd.
Address: Building A, SIM Technology Building, No. 633, Jinzhong Road, Shanghai,
P. R. China 200335
Tel: +86 21 3252 3300
Fax: +86 21 3252 2030
URL: www.sim.com/wm