You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import smtplib, ssl
port = 465 # For SSL
smtp_server = "smtp.gmail.com"
sender_email = "my@gmail.com" # Enter your address
receiver_email = "your@gmail.com" # Enter receiver address
password = input("Type your password and press enter: ")
message = """\
Subject: Hi there
This message is sent from Python."""
context = ssl.create_default_context()
with smtplib.SMTP_SSL(smtp_server, port, context=context) as server:
server.login(sender_email, password)
server.sendmail(sender_email, receiver_email, message)
The text was updated successfully, but these errors were encountered:
The above code snippet will not work. It's also not ideal to have to encrypt / obscure the user's email account password for this one feature. In the interest of time, going to see if I can just use the user's authenticated Google account for this...
See issue here regarding using Google credentials (since entire authentication process is handled by PyDrive): iterative/PyDrive2#179
The text was updated successfully, but these errors were encountered: