• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32-CAM – Email Delivery Problem

Q&A Forum › Category: ESP32 › ESP32-CAM – Email Delivery Problem
0 Vote Up Vote Down
Peter asked 2 years ago

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.
Thanks
 

9 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
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.
Regards,
Sara

0 Vote Up Vote Down
Peter answered 2 years ago

Hi Sara,
The Arduino board setting is ‘AI Thinker ESP32-CAM’.
Peter

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

No.
I mean the ESP32 boards version that you have in Tools > Boards > Boards Manager… Then search for ESP32 and check the version.

0 Vote Up Vote Down
Peter answered 2 years ago

I have esp32 by Espressif Systems version 1.0.6 installed.

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi again.
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.
Regards,
Sara

0 Vote Up Vote Down
Peter answered 2 years ago

Hi Sara,
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.
Regards,
Peter
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok.
Then, let me know the results.
Regards,
Sara

0 Vote Up Vote Down
Peter answered 2 years ago

Hi Sara,
I have cleared the problem by using gmail with an app pasword as laid out in the eBook.
A lesson well learnt.
Thank you.
Peter

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok, great. I’m glad the issue is solved.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.