import smtplibfrom_email="from_eamil@163.com"to_email="to_eamil@163.com"message="""From:%sTo:%sSubject:Hello This is a Title.This is content.what a nice day!nice nice nice!!!!"""%(from_email,to_email)smtp = smtplib.SMTP()smtp.connect("smtp.163.com","25")smtp.login("from_eamil","from_eamilpasswd")smtp.sendmail(from_email,to_email,message)