I recently found this script online to send emails with the smtplib library for python.
import smtplib as smtp
connection = smtp.SMTP_SSL('smtp.gmail.com', 465)
email_addr = 'me@gmail.com'
email_passwd = 'password'
connection.login(email_addr, email_passwd)
connection.sendmail(from_addr=email_addr, to_addrs='someone@gmail.com', msg="Sent
from my IDE. Hehe")
connection.close()
How do I receive new emails?
Maybe by running something similar to connection.sendmail, like this: 'connection.getmail'
Thanks in advance!