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

Static IP #5

Closed papirrin999 closed 4 years ago

papirrin999 commented 4 years ago

the library isn`t compatible with static mode WiFi.mode(WIFI_STA); WiFi.config(ip, gateway, subnet); WiFi.begin(ssid, password);

barneyz commented 4 years ago

With static mode, you must define a dns ip, otherwise the dns resolution of the mailserver fails. Not a sender-library problem, i had this problem first with a dns resolution of a ntp-server ("de.pool.ntp.org")

IPAddress ip MY_IP; IPAddress gateway MY_GATEWAY; IPAddress subnet MY_SUBNET; IPAddress dns MY_DNS; // can be the gateway IP

WiFi.mode(WIFI_STA); WiFi.config(ip, gateway, subnet, dns); WiFi.begin(ssid, password);

papirrin999 commented 4 years ago

OK. I use a WEMOS D1 R1 Core but it does not work defining a dns ip I have tried with your example and others without satisfactory results, investigating I saw that this library is not a problem, thank you very much for your answer.

xreef commented 4 years ago

Thanks tuo @barneyz for the precious support.. I close the issue. Bye Renzo