I’m unable to email images with the Motion_Detector_Photo_Email_NEW.ino code from the ESP32-Cam Project book.
I’m using outlook.com, with the smtpServer “smtp.office365.com” and smtpServerPort 587. The destination is a gmail account.
The ESP_Mail_Client.h library version is 1.6.4.
The code compiles without error.
Despite trying different destinations, the error message is the same
Sending message header…
> C: send message header
< S: 250 2.1.0 Sender OK
< S: 501 5.5.4 Invalid arguments
Error, set recipient failed
I use the same smtpServer setting in another program: https://randomnerdtutorials.com/esp32-cam-send-photos-email/ which is based on the ESP32_MailClient.h librarywithout fault.
What is the ESP32 version you have installed in Arduino IDE?
Tools > Boards > Boards Manager > ESP32 and check your version, so that I can test the sketch with the same settings as your setup.
I mean the ESP32 boards version that you have in Tools > Boards > Boards Manager… Then search for ESP32 and check the version.
I just tested the code and it is working fine for me.
What are you inserting in the emailSenderPassword field? Are you using the email password or an app password? I never tested with outlook, but I think you need to use the app password. It would also be a good idea to try to update the library as well and test the code again.
I hope this helps.
It does seem the problem is with Outlook. The camera running the other Outlook program also stopped this morning.
The machine usage of the account restricted access and needed verification by the account holder to remove the restriction.
I’ve completed that, and hopefully, the account will be functioning soon.
If I don’t have any joy with Outlook, I’ll try the Gmail option from the book.
Thank you very much for your help.
I have cleared the problem by using gmail with an app pasword as laid out in the eBook.
A lesson well learnt.