import smtplib
from email.mime.text import MIMEText

MailSever = "smtp.126.com"
Sender = "[email protected]"
Password = "xxx"

Message = "hello"
Msg = MIMEText(Message)

Msg["Subject"] = "ok"
Msg["From"] = Sender

s = smtplib.SMTP(MailSever, 25)
s.login(Sender, Password)
s.sendmail(Sender, ["[email protected]", "[email protected]"], Msg.as_string())

s.quit()