Library to send EMail via esp8266.
Updated tutorial on my site
Tutorial:
To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder EMailSender. Check that the EMailSender folder contains EMailSender\\.cpp and EMailSender.h. Place the DHT library folder your <arduinosketchfolder>/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.
Reef complete EMailSender library to send EMail.
I try to rationalize a famous library like Gsender.
Constructor: Default value is quite simple and use GMail as smtp server.
EMailSender emailSend("smtp.account@gmail.com", "password");
If you want use onother provider you can use more complex (but simple) contructor
EMailSender(const char* email_login, const char* email_password, const char* email_from, const char* smtp_server, uint16_t smtp_port);
You must connect to WIFI :P.
Create a message with the structure EMailMessage
EMailSender::EMailMessage message;
message.subject = "Subject";
message.message = "Hi, How are you<br>Fine.";
Send message:
EMailSender::Response resp = emailSend.send("account_to_send@gmail.com", message);
Then check the response:
Serial.println("Sending status: ");
Serial.println(resp.code);
Serial.println(resp.desc);
Serial.println(resp.status);
Example output:
Connection: ESTABLISHED
Got IP address: 192.168.1.104
Sending status:
1
0
Message sent!

