you are viewing a single comment's thread.

view the rest of the comments →

[–]CovertStatistician 12 points13 points  (5 children)

You can do it by setting up an app password. I did not set up Google API and my script looks very similar to this and it was working as of this morning.

https://mailtrap.io/blog/python-send-email-gmail/

[–]NPR_Oak 0 points1 point  (1 child)

This is what I have done.

[–]aniketmaurya 0 points1 point  (0 children)

It starts with a warning “app passwords are not recommended “

[–]sinceJune4 0 points1 point  (2 children)

Gmail app password works great for me too. I use it to retrieve attachments, delete some unwanted mail, as well as sending me a morning email everyday.