Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
CC3100 SLS Email Demo Application
Overview and application details
This sample applications demonstrates how CC3100 can be used to send an email over SMTP. The application configures CC3100 to connect w/ an SMTP server and sends email to it. SMTP server forwards it to the recipient's email-server and the recipient receives the email from his email-server using IMAP/POP3 and/or other proprietary protocol.
Note: This wiki page is only applicable for CC3100-SDK v1.0.0 and upward releases. For documentation on older SDKs' examples, refer corresponding file in <cc3100-sdk-installation-location>\cc3100-sdk\docs\examples\
Email application's sequence
- Client first makes a TCP connection with SMTP server.
- SMTP server replies back w/ response-code and greeting-message containing FQDN
- HELO/EHLO – Client sends Hello Message to the server. ESMTP accepts EHLO
- The SMTP server replies with Code 250 and Hello Message. ESMTP Server replies with SMTP extensions it supports such as Email maximum Size, authentication etc.
- If SMTP server requires authentication, the client sends “auth login” followed by “Username” and “Password” encoded with proper encryption accepted by SMTP Server.
- auth login
- 334 VXNlcm5hbWU6
- Client sends "Username" encoded with proper encryption accepted by SMTP server
- Client sends "Password" encoded with proper encryption accepted by SMTP Server
- 334 UGFzc3dvcmQ6
- SMTP server replies with Authentication Success/Failure.
- 535 Incorrect authentication data/ 235 Authentication Successful
- SMTP client then sends From-Address
- MAIL FROM: firstname.lastname@example.org
- SMTP client sends To-Address
- RCPT TO: email@example.com
- SMTP client sends DATA command
- SMTP client sends email data.
- SMTP server responds with the acknowledgement
Source Files briefly explained
- main - Initializes the device, connects to an access-point and configures the email
- email - Wrapper functions to connect to SMTP-Server and send the configured email. These functions are called from main
- base64 - Functions to convert the raw bytes in quasi-big-endian order to Base64 string
Prerequisite: Internet connectivity is required to work w/ this sample application
- Open config.h and change values for USER and PASS for setting up the source email.
CC3100 will try to establish connection w/ this AP when instructed by the user. Ensure the access-point has internet connectivity
- Compile and run the application using Visual-Studio or Eclipse
- User will be prompted to configure the AP parameters for establishing a Wi-Fi connection
- Enter 01 to connect to the configured AP
This is the AP that was configured above
- Enter 03,<destination email>,<subject> to set the destination e-mail address and subject
- Enter 04,<message>
- Enter 05 to send the email
- On success, below message will be displayed on the console
- The size of the message is currently 64.
- Subject should be less that 30 characters
- Destination email should be less that 30 characters.