I have written a python script to send email from my gmail account to my another email. the code is:
import smtplib
fromaddr = 'my@gmail.com'
toaddrs = 'to@gmail.com'
msg = 'my message'
username = 'my@gmail.com'
password = 'myPass'
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
print("Done")
I'm also getting the "Done" output as the email is being sent. But the problem is: I can't seem to receive the email. It doesn't show up in the inbox. I can't find the problem :( Can anyone please help?
Thanks in advance...