Hi there,
I’m having trouble with the “Send_Photos_Email_NEW.ino” sketch described in the ESP32-CAM book. Google has changed the security settings and it would no longer be possible to access an account with just username and password.
Is there a solution ?
Many thanks in advance for your advice.
Hi.
You need to use an app password instead of the “regular” password.
An App Password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. Learn more about sign-in with app passwords here.
An app password can only be used with accounts that have 2-step verification turned on.
- Open your Google Account.
- In the navigation panel, select Security.
- Under “Signing in to Google,” select 2-Step Verification > Get started.
- Follow the on-screen steps.
After enabling 2-step verification, you can create an app password.
- Open your Google Account.
- In the navigation panel, select Security.
- Under “Signing in to Google,” select App Passwords.
- In the Select app field, choose mail. For the device, select Other and give it a name, for example ESP32. Then, click on Generate. It will pop-up a window with a password that you’ll use with the ESP32 to send emails. Save that password (even though it says you won’t need to remember it) because you’ll need it in your code.
Now, you should have an app password that you’ll use on the ESP32 code to send the emails.
Let me know if this works.
Regards,
Sara
Hello Sarah,
As usual, you answered right away!
I managed to modify the security of my account by following your instructions. What a pain !!
I would never have made it without your advice.
A big thanks.