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 works only with smtp.gmail.com port 465 #30

Closed lerman06470 closed 2 years ago

lerman06470 commented 2 years ago

By default, EMailSender uses smtp.gmail.com and port 465. That's coded into EMailSender.h. I tried to use smtp.sendgrid.net, port 25 by calling:

    emailSend.setSMTPPort(smtpPort);

The platform is a nano 33 IOT.

I ran tcpdump on my firewall and found that some invalid stuff is sent prior to the HELO. It appears to be a TLS handshake which gmail handles just fine. I tried turning off isSecure: emailSend.setIsSecure(false); That didn't seem to help, and tcpdump still showed extraneous data being sent.

Using a secure port on sendgrid also failed to connect.

xreef commented 2 years ago

Hi, search on the forum, there is a topic that describe all the step to configure send grid. Bye Renzo

lerman06470 commented 2 years ago

I looked, but didn't find anything useful. The underlying problem should be addressed or documented.

Looking at the code I found that on this platform EMailSender ignores the isSecure flag.

I patched the code to use WiFiClient instead of the SSL version since that solves my immediate problem.

I'll open a new issue so that it doesn't get lost.

Thanks,

Ken

Kenneth Lerman 55 Main Street Newtown, CT 06470

On Mon, Aug 15, 2022 at 10:32 AM Renzo Mischianti @.***> wrote:

Hi, search on the forum, there is a topic that describe all the step to configure send grid. Bye Renzo

— Reply to this email directly, view it on GitHub https://github.com/xreef/EMailSender/issues/30#issuecomment-1215082080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN3NHLHWGM5SBWW6G35ZISDVZJIJLANCNFSM56SMTG3A . You are receiving this because you authored the thread.Message ID: @.***>