Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
SMTP Protocol
The SMTP (Simple Mail Transfer Protocol) is used to send emails, and Flyport can send emails using a
Non-SSL connection. The user can customize sender, receiver, subject and message at runtime.
The usage of SMTP is not recommended for frequent communication, since it can overflow servers. It
should be used to report occasional errors, daily reports or similar tasks.
QUESTION: How can I use SSL connections?
SSL is not free of charge on Microchip's TCPIP stack, and must be purchased by a user.
At this time SSL implementation is not provided in the openPicus Framework
Here is a simple example on how to use SMTP feature with a mail-server that does not need an SSL
connection. This example needs to be changed with valid account settings:
#include "taskFlyport.h"
void FlyportTask()
{
char reportResult[40];
// Flyport Wi-Fi // Flyport Ethernet
WFConnect(WF_DEFAULT); while(!MAClinked);
while (WFStatus != CONNECTED);
vTaskDelay(200);
while(1)
{
if (UARTBufferSize(1) > 1)
{
vTaskDelay(50);
char uread[257];
int toread = UARTBufferSize(1); //We want to read all the
//chars on the UART buffer
UARTRead(1,uread, toread); //Reads all the chars in the
//buffer, and put them in the var uread
uread[toread]='\0'; // Add Null char at the end
if (strstr(uread,"email")!=NULL)
{
if(SMTPStart())
{
UARTWrite(1,"SMTP Started!\r\n");
SMTPSetServer(SERVER_NAME, "lavabit.com");
SMTPSetServer(SERVER_USER, "user");
SMTPSetServer(SERVER_PASS, "pass");
SMTPSetServer(SERVER_PORT, "25");
SMTPSetMsg(MSG_TO, "test@email.eu");
SMTPSetMsg(MSG_BODY, "Flyport sends emails!!!" );
48










