Email(SMTP/POP3) Application Note



Similar documents
SIM800 Series_SSL_Application Note_V1.00

SIM800 Series_SSL_Application Note_V1.01

SIM800 Series_IP_Application Note_V1.02

GSM. Quectel Cellular Engine. GSM TCPIP Application Notes GSM_TCPIP_AN_V1.1

Quectel Cellular Engine

SIMCom_3G_SSL_Application Note_V1.10

SIM900_ _AT Command Manual_V1.02

GSM. Quectel Cellular Engine. HTTP Service AT Commands GSM_HTTP_ATC_V1.2

Quectel Cellular Engine

SIM900 Eclipse environment install Application Note_V1.00

SMS Application Note. SIM5360_SMS_Application_Note_V0.01

SIM900_Custom Application Building Tutorial_Application Note_V1.00

Quectel Cellular Engine

Version 2.1 User Guide 05/2003

WaveWare Technologies, Inc. We Deliver Information at the Speed of Light

Nokia for Business. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

TCPIP Application Note for WCDMA Solution V2.0

Quectel Cellular Engine

How To Use Gfi Mailarchiver On A Pc Or Macbook With Gfi From A Windows 7.5 (Windows 7) On A Microsoft Mail Server On A Gfi Server On An Ipod Or Gfi.Org (

Device Log Export ENGLISH

Setting up Your Acusis Address. Microsoft Outlook

Issue 2EN. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

Nokia E90 Communicator support

TNote125 Student Locator Framework Notification Diagnostics

Codici errore Universal Send Kit

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

POP3 Connector for Exchange - Configuration

ONE-TOUCH MAIL V 2.3 MANUAL

Setup Guide for Exchange Server

Appendix. Web Command Error Codes. Web Command Error Codes

Electronic Mail

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

SUPPORT GUIDE FOR SETTINGS IN NOKIA 6600 IMAGING PHONE

Jobs Guide Identity Manager February 10, 2012

SendMIME Pro Installation & Users Guide

Track and Trace. Administration Guide

To install the SMTP service:

SIM800 Series_FM_Application Note_V1.00

PC User s Guide PC User s Guide Muratec America, Inc.

Customer Tips. Configuration and Use of the MeterAssistant Option. for the user. Purpose. Xerox Device Configuration. Xerox Multifunction Devices

Scan to Quick Setup Guide

Collax Mail Server. Howto. This howto describes the setup of a Collax server as mail server.

Novar Database Mail Setup Guidelines

DocuShare Print and Setup and User Guide

Internet Technologies Internet Protocols and Services

SMTP POP3 SETUP FOR EMC DOCUMENTUM eroom

Using Avaya Aura Messaging

Sonian Getting Started Guide October 2008

Quectel Cellular Engine

SharePoint Password Change & Expiration 3.0 User Guide

GFI Product Guide. GFI MailArchiver Archive Assistant

FTP and . Computer Networks. FTP: the file transfer protocol

Installing Policy Patrol with Lotus Domino

Installing Policy Patrol on a separate machine

U.S. Bank Secure Mail

Configuring Notification for Business Glossary

WCDMA&GSM Module_Extra_Function_for_Network

CompleteView Admin Console Users Guide. Version Revised: 02/15/2008

Quick Scan Features Setup Guide. Scan to Setup. See also: System Administration Guide: Contains details about setup.

To configure Outlook Express for your InfoMetrics address:

GFI Product Manual. GFI MailArchiver Outlook Addon

NETWORK USER S GUIDE MFC-9460CDN MFC-9465CDN MFC-9560CDW. Internet Fax and Fax to Server features

How To Upgrade To Symantec Mail Security Appliance 7.5.5

Solve network scan problems. Common problems and solutions Scan to status Scan to FTP status Job Accounting status...

How to Secure a Groove Manager Web Site

Configuring Security for SMTP Traffic

MailEnable Installation Guide

Integrated Migration Tool

How To Use A Pmsft On A Pc Or Mac Or Mac (For Mac) With A Pmf (For Pc) Or Mac Mac (Or Mac) On A Mac Or Pc (For Pmsf) On An Ipad

1 Introduction: Network Applications

Wakefield Council Secure and file transfer User guide for customers, partners and agencies

The basic groups of components are described below. Fig X- 1 shows the relationship between components on a network.

Operating Instructions (For User Authentication)

BlackBerry Internet Service. Version: User Guide

Print/Scan System (U)

Using Your New Webmail

Customer Tips. Basic Configuration and Troubleshooting. for the user. Overview. Basic Configuration. Xerox Multifunction Devices.

Parallels Plesk Panel

OR Filter 3.2 Manual. Draft. Copyright 2003, Martijn Jongen. All Rights Reserved Version : Ref. nr. : MhJ/ By : M.

Spam Marshall SpamWall Step-by-Step Installation Guide for Exchange 5.5

How to configure your client

ACCELERATOR 6.3 ALARMS AND OPERATIONAL MEASUREMENTS

Networking Applications

U10. Quectel Cellular Engine. Video Call Application Notes. U10_ Video_Call_AN_V1.0

USER GUIDE WEB-BASED SYSTEM CONTROL APPLICATION. August 2014 Phone: Publication: , Rev. C

Novatel U530 & U630 O2 Branded Datacards Installation instructions for: O2 version of Mobilink Software: Version

SonicWALL Global Management System Installation Guide Entry Edition. Version 2.1

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

SNMP Web Management. User s Manual For SNMP Web Card/Box

Advanced Settings. Help Documentation

LDAP Operation Guide

Mail Programs. Manual

SMTP-32 Library. Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows. Version 5.2

Importing data from Linux LDAP server to HA3969U

Transcription:

Email(SMTP/POP3) Application Note

Document Title: Email(SMTP/POP3) Application Note Version: 0.01 Date: 2014-02-21 Status: Document ID: Developing.doc 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. Copyright Shanghai SIMCom Wireless Solutions Ltd. 2013 1

Version History Version Chapter Comments V0.01 New Version 2

Contents Version History...2 Contents...3 Email(SMTP/POP3) Application Note...4 1. Overview...4 2. Call Commands...6 3. SMTP Application...8 3.1 Parameter Configuration... 8 3.2 Write/Send Email... 8 3.3 Abort Email Application... 9 4. POP3 Application...9 4.1 Parameter Configuration... 9 4.2 Inquire New Email... 9 4.3 Peek At New Email... 10 4.4 Retrieve Email Without Delete...11 4.5 Retrieve Email With Delete... 12 4.6 Abort POP3 Application... 13 4.7 Read Email In File System... 14 5. Conflict AT Commands...15 Contact Us...16 3

1. Overview Email(SMTP/POP3) Application Note Simple Mail Transfer Protocol (SMTP) is an internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks, and it is a text-based protocol. To sending an e-mail successfully, TE must set some mandatory parameters for SMTP client correctly, such as SMTP server address, sender and recipient address. After the process of sending an e-mail is started, SMTP Client will initiates a Transmission Control Protocol (TCP) session with the SMTP server to send e-mail. SMTP features: Support SMTP authentication basing on SMTP server. Multi-recipient: TO, CC and BCC. ASCII test as e-mail subject, up to 512 characters. ASCII test as e-mail body, up to 5120 characters. E-mail attachments from File System: total size up to 10MB or maximal number up to 10 files. Stop SMTP application and close TCP session directly. SMTP URCs (Unsolicited Result Code) +SMTP: +SMTP: SUCCESS +SMTP: ONGOING +SMTP: PARAM ERROR +SMTP: NETWORK ERROR +SMTP: SERVER ERROR +SMTP: AUTH REQUIRED +SMTP: AUTH REQUIRED +SMTP: AUTH ERROR +SMTP: BAD RCPT [ <recipient address>] TCP session is, and start sending e-mail. Send e-mail successfully, and network is closed. Another e-mail is being sent. Mandatory parameter is invalid. Network is unavailable for SMTP. Invalid SMTP server, or network is bad for establishing session or sending data to SMTP server. SMTP server released the session, or SMTP server rejects the operation with wrong response, or SMTP server doesn t give SMTP client a response in time. Authentication is required by SMTP server. SMTP server rejects the session because of bad user name and password combination. Invalid recipient address, or SMTP server can t forward this e-mail to the address. SMTP elements to construct e-mail s header sender s address and name, recipient s address and name, mail subject, Real Time Clock (RTC) and time-zone. It is recommended to set RTC and time-zone (refer to command +CCLK). 4

Post Office Protocol Version 3 (POP3) is an application-layer internet standard protocol used by local e-mail client (POP3 client) to retrieve and delete e-mail from a remote POP3 server over a TCP/IP connection. POP3 features: POP3 server authentication. Number and total size of new e-mails. Get e-mail ID size of each e-mail. Peek at e-mail s header. Get and delete e-mail from POP3 server. Save e-mail and attachment basing on File System (Local storage or storage card). Read the latest e-mail directly, or read e-mail from File System. Stop POP3 application and close TCP session directly. POP3 basic functionality: Inquire whether new e-mail has arrived but not retrieve it. Peek at e-mail whether it is worth retrieving (read mail header). Retrieve e-mail from POP3 server but not delete it on the server. Retrieve e-mail from POP3 server and delete it on the server. POP3 URCs (Unsolicited Result Code) +POP3: FAILURE +POP3: NETWORK ERROR +POP3: SERVER ERROR +POP3: INVALID UN +POP3: INVALID UN/PWD +POP3: FILE SYSTEM ERROR POP3 client gets an e-mail successfully. POP3 client gets an e-mail unsuccessfully. Invalid POP3 server, or network is bad to establish session or sending data to POP3 server. POP3 server released the session, or POP3 server rejects the operation with wrong response, or POP3 server doesn t give POP3 client a response in time, or POP3 client gives wrong e-mail s ID. POP3 client will not close the session. Invalid user name to log in POP3 server. Invalid user name and password combination to log in POP3 server. File system is bad for saving E-mail or attachment, storage space isn t enough, or storage card is pulled out. If POP3 client encounters this error, POPE client will close the session with POP3 server. NOTE SMTP timer: 30 seconds, if expired, SMTP application will stop. POP3 timer: 30 seconds, if expired, SMTP application will stop. 5

2. Call Commands This section only lists e-mail(smtp/pop3) related commands. Please refer to AT command document to get detailed descriptions. AT+SMTPSRV Configure SMTP server, including server address and its port number. E.g. AT+SMTPSRV="smtp.server.com",25 AT+SMTPAUTH Configure if SMTP client provides user name and password SMTP server when access SMTP server. If SMTP server requests authentication but SMTP client does not provide, Email will be sent with a failed result. E.g. AT+SMTPAUTH=0 >> No authentication reques.t AT+SMTPAUTH=1,"un","pwd" >> SMTP server requests authentication. AT+SMTPFROM Configure sender s mail address and present name, they are used to construct email header. E.g. AT+SMTPFROM="mike@server.com","mike" AT+SMTPFROM="mike@server.com" >> Only configure mail address. AT+SMTPRCPT Configure recipients mail address and name for each email. E.g. AT+SMTPRCPT=0,0,"toaddr@server.com","toname" >> First normal recipient AT+SMTPRCPT=0,1,"toaddr@server.com" >> Second normal recipient without name AT+SMTPRCPT=0,0 >> Clear the first normal recipient AT+SMTPRCPT=0 >> Clear all normail recipient AT+SMTPRCPT=1,0,"ccaddr@server.com","ccname" >> First CC recipient AT+SMTPRCPT=2,0, bccaddr@server.com","bccname" >> Frist BCC recipient AT+SMTPSUB Write the subject for each mail. E.g. AT+SMTPSUB="First email" AT+SMTPBODY Write the content for each mail. E.g. AT+SMTPBODY="This is the first email!" AT+SMTPFILE Select files from current directory in file system (local space or storage card) as email s attachments. E.g. AT+SMTPFILE=1,"file1" >> Select "file1" as the first attachment AT+SMTPFILE=2,"file2" >> Select "file2" as the second attachment AT+SMTPFILE=1 >> Delete the first attachment AT+SMTPFILE >> Delete all attachments (no attachment) 6

AT+SMTPSEND Establish TCP session between SMTP client and server, construct and send email. URC "+SMTP: SUCCESS" indicates a successful result. Command +SMTPSEND? can be used to inquire if SMTP client is in idle state. AT+SMTPSTOP Force to stop the TCP session and then SMTP client is in idle state. AT+POP3SRV Configure POP3 server and access account. E.g. AT+POP3SRV="pop3.server.com","un","pwd",110 AT+POP3IN Establish TCP session and access POP3 server. AT+POP3NUM Inquire the number of unread emails and the total size of these unread emails. AT+POP3LIST List each email s ID(from 1 to unread emails number) and size, or list specified email s ID and size. AT+POP3HDR Get specified email s header from POP3 server. AT+POP3GET Get specified email and save email s attachments into directory "C:/Email" or D:/Email (depending on the value of command +FSLOCA) AT+POP3DEL Mark the email and after POP3 client finishs the session normally, POP3 server will delete the specified email. AT+POP3OUT Finish the session normally. AT+POP3STOP Force to finish the session. AT+POP3READ Return last or specified email s header and content. 7

3. SMTP Application 3.1 Parameter Configuration Host must configure mandatory parameters for SMTP client before SMTP application. The mandatory parameters include <socket PDP context>, <server address>, <server port>, <authentication or not>, <sender address> and <sender name>. NOTE Only configure mandatory parameters once correctly, until reboot. AT+CGSOCKCONT=1,"IP","3GNET","0.0.0.0",0,0 AT+SMTPSRV="smtp.server.com",25 AT+SMTPAUTH=1,"UserName","password" AT+SMTPFROM="UserName@server.com","PresentName" 3.2 Write/Send Email Commands +SMTPSUB, +SMTPBODY and +SMTPFILE are used to complete an email. Command +SMTPSEND is used to send the email. For multi-email, host can control SMTP client to repeat the same process for many times. AT+SMTPRCPT=0,0,"ToAddr@server.com","ToName" AT+SMTPRCPT=1,0,"CcAddr@server.com","CcName" AT+SMTPSUB="First Email" AT+SMTPBODY="This is the first Email!" AT+FSCD=C:/Picture +FSCD: C:/Picture/ AT+FSLS +FSLS: FILES: 20100202_100006.jpg 20100202_100016.jpg 8

AT+SMTPFILE=1,"20100202_100006.jpg" AT+SMTPFILE=2,"20100202_100016.jpg" AT+SMTPSEND +SMTP: +SMTP: SUCCESS 3.3 Abort Email Application Commands +SMTPSUB, +SMTPBODY and +SMTPFILE are used to complete an email. AT+SMTPRCPT=0,0,"ToAddr@server.com","ToName" AT+SMTPSUB="First Email" AT+SMTPBODY="This is the first Email!" AT+SMTPSEND +SMTP: AT+SMTPSTOP 4. POP3 Application 4.1 Parameter Configuration Host must configure mandatory parameters for POP3 client before POP3 application. The mandatory parameters include <socket PDP context>, <server address>, <server port>, <access user name>, <access password> and <email location>. NOTE Only configure mandatory parameters once correctly, until reboot. AT+CGSOCKCONT=1,"IP","3GNET","0.0.0.0",0,0 AT+POP3SRV="pop3.server.com","un","pwd",110 4.2 Inquire New Email 9

There is no new email on POP3 server, so release the session directly. NOTE If no operation for long time when the session is active, POP3 server may release the session. AT+POP3IN AT+POP3NUM +POP3: 0, 0 AT+POP3OUT 4.3 Peek At New Email Peek at email whether it is worth retrieving, if all emails are not worth, release the session directly. AT+POP3IN AT+POP3NUM +POP3: 2 2134 AT+POP3LIST=1 +POP3: 1, 1050 AT+POP3HDR=1 Date: Tue, 9 Mar 2010 17:11:30 +0800 Subject: First Test Email AT+POP3LIST=2 +POP3: 2, 1084 10

AT+POP3HDR=2 Date: Tue, 9 Mar 2010 17:16:27 +0800 Subject: Second Test Email AT+POP3OUT 4.4 Retrieve Email Without Delete AT+POP3IN AT+POP3NUM +POP3: 2 2134 AT+POP3LIST=1 +POP3: 1, 1050 AT+POP3HDR=1 Date: Tue, 9 Mar 2010 17:11:30 +0800 Subject: First Test Email AT+POP3LIST=2 +POP3: 2, 1084 AT+POP3HDR=2 Date: Tue, 9 Mar 2010 17:16:27 +0800 Subject: Second Test Email 11

AT+FSLOCA=0 AT+POP3GET=1 C:/Email/100202110457/, EMAIL000.TXT AT+POP3READ Date: Tue, 9 Mar 2010 17:11:30 +0800 To: "ToName" <ToAddr@server.com> Subject: First Test Email This is a test email with an attachment. AT+POP3OUT 4.5 Retrieve Email With Delete AT+POP3IN AT+POP3NUM +POP3: 2 2134 AT+POP3LIST=1 +POP3: 1, 1050 AT+POP3HDR=1 Date: Tue, 9 Mar 2010 17:11:30 +0800 Subject: First Test Email 12

AT+POP3LIST=2 +POP3: 2, 1084 AT+POP3HDR=2 Date: Tue, 9 Mar 2010 17:16:27 +0800 Subject: Second Test Email AT+FSLOCA=0 AT+POP3GET=1 C:/Email/100202113456/, EMAIL000.TXT AT+POP3READ Date: Tue, 9 Mar 2010 17:11:30 +0800 To: "ToName" <ToAddr@server.com> Subject: First Test Email This is a test email with an attachment. AT+POP3DEL=1 AT+POP3OUT 4.6 Abort POP3 Application AT+POP3IN 13

AT+POP3NUM +POP3: 2 2134 AT+POP3LIST=1 +POP3: 1, 1050 AT+POP3HDR=1 Date: Tue, 9 Mar 2010 17:11:30 +0800 Subject: First Test Email AT+POP3LIST=2 +POP3: 2, 1084 AT+POP3HDR=2 Date: Tue, 9 Mar 2010 17:16:27 +0800 Subject: Second Test Email AT+FSLOCA=0 AT+POP3GET=1 AT+POP3STOP 4.7 Read Email In File System AT+FSCD=C:/Email +FSCD: C:/Email/ AT+FSLS +FSLS: SUBDIRECTORIES: 100202110457 14

100202113456 AT+POP3READ=0,"100202110457/EMAIL000.TXT" Date: Tue, 9 Mar 2010 17:11:30 +0800 To: "FromName" <ToAddr@server.com> Subject: First Test Email This is a test email with an attachment. 5. Conflict AT Commands Following AT commands cannot be used with SMTP/POP3 AT commands together: TCP/IP AT commands MMS AT commands GPS AT commands 15

Contact Us Shanghai SIMCom Wireless Solutions Ltd. Add: Building A, SIM Technology Building, No.633, Jinzhong Road, Changning District 200335 Tel: +86 21 3252 3300 Fax: +86 21 3252 3301 URL: http:/www.sim.com/wm/ 16