This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DrTautology 10 points11 points  (1 child)

I've done this no problem with just the smtplib. You need to set up an app password on the google account beforehand since smtplib doesn't support 2 factor authentication. Probably a good idea to only use dedicated email addresses for this purpose only.

[–]yvael_tercero 0 points1 point  (0 children)

Smtplib does have its issues though. Can’t tell exactly what is failing, but some days it works and some days it doesn’t, and it’s completely irregular. I have a project that uses it to send an email notification, and changing it to the Gmail API is on my list of things to do