import smtplib from email.message import Message sender = "email@gmail.com" receiver = "address@anotherHost.tld" pw = "MyPassword" smtpServer = "smtp.gmail.com" msg = Message() msg.set_payload("Test message content") msg["Subject"] = "smtplib-test" msg["From"] = sender msg["To"] = receiver smtp = smtplib.SMTP(smtpServer) smtp.set_debuglevel(1) smtp.starttls() smtp.login(msg["From"], pw) smtp.sendmail(msg["From"], msg["To"], msg.as_string())

AltStyle によって変換されたページ (->オリジナル) /