G’Day, new subscriber here. Idea is to use ESP32-2432S028(CYD) with MStack CardKB as a spare device to send Email from home. I got an example program to work initially, then got failed authentication alarms. This was a Gmail address with 16 letter code. Credentials and/or code aren’t valid. Any advice on using alternatives? SMTP2GO and SendGrid have been suggested. I’m using Arduino IDE. Any YouTube videos, or other articles to read would be appreciated.
You may need to provide more information here as their may be simple things at play that you need to add/do.
to send an email, the basic way is to use the SMTP protocol… but normally to stop abuse receiving email servers fall into one of two groups.
a) the target email server: i.e. this is where the target mailbox lives and they can accept it.
b) a relay server, this are more like your ISP/eMail provider smtp servers, where they allow you to send an email to them and they then send that on to the target email server.
Over time, protocols were added to slow down abuse/spamming. DMARC is the current frame work and for full setup you sending (public) IP should be registered in the spf record AND you should be signing it with DKIM.
That said, spf/dkim etc are only needed ot setup on the domain you appear to be sending from (e.g. your email domain). While DMARC states spf OR DKIM, some target email servers may only support SPF or only support DKIM and if you don’t use what they check it could fail.
Most of the time all of the above is hidden from end users by you email provider. In such cases, they wont allow a blind SMTP connection. Normally they will require some proof/authentication you are a customer of theirs and you own the “senders” email.
HOW the do this may vary a little. SMTP has standards but some providers may extend those a little. e.g. some authentication may require you get a token, so you send a valid username/password and get a token back. Then you use that token to send the message, over some time period that token may expire and you then need to re-auth and get a new token…
Note: all the above is just a high level over view, but what you need to know is how YOUR email provider requires you to work. IF you can send email from your email client, then there really should be no reason why you cant do the same from and SMTP device, as long as it supports what is needed.
Code had stopped working as I had changed my password, this cancels any 16 letter codes. Made a new auth. code and it works again. Thanks for your input and I’ll do some further research.