xreef / EMailSender

Arduino, esp32, Esp8266 EMailSender with Arduino IDE, simple library to send email via smtp with attachments.
https://www.mischianti.org/category/my-libraries/emailsender-send-email-with-attachments/
MIT License
74 stars 26 forks source link

EMailSender using Ethernet Shield #15

Closed DavidTD1 closed 3 years ago

DavidTD1 commented 3 years ago

I am trying to use EMailSender using Ethernet Shield but it is not working. I already followed the steps in the documentation but it doesn't work for me.

include

include

include

// Enter a MAC address for your controller below. // Newer Ethernet shields have a MAC address printed on a sticker on the shield byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

EMailSender emailSend("sistem@gmail.com", "password");

void setup() { // Open serial communications and wait for port to open: Serial.begin(115200); // while (!Serial) {}

delay(2000);

Serial.println("Starting!");

// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
  Serial.println("Failed to configure Ethernet using DHCP");
  while(1);
}
Serial.print("IP address ");
Serial.println(Ethernet.localIP());

EMailSender::EMailMessage message;
message.subject = "Soggetto";
message.message = "Ciao come stai<br>io bene.<br>www.mischianti.org";

EMailSender::Response resp = emailSend.send("mail@gmail.com", message);

Serial.println("Sending status: ");

Serial.println(resp.status);
Serial.println(resp.code);
Serial.println(resp.desc);

} void loop() { // put your main code here, to run repeatedly:

}

xreef commented 3 years ago

Answer here https://www.mischianti.org/forums/topic/emailsender-using-ethernet-shield/.