-1
import smtplib
fromaddr="[email protected]"
toaddr="[email protected]"
message = 'Subject: {}\n\n{}'.format("imp", "testing file")
password="[email protected]"
server=smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(fromaddr,password)
server.sendmail(fromaddr,toaddr,message)
print "Success"
server.quit()
我需要的收件箱中接收電子郵件「以解決」使用的Python:如何發送電子郵件模板