Non-ssl to 163 e-mail, error, no solution ing

# 163 to send a message 
Import smtplib
from email.mime.text Import MimeText
nam='[email protected] '
send='[email protected]'
receive='[email protected] '
PW =' 37193350d 'password # error, modify the runtime
Server = 'smtp.163.com'
Port 0 =
Message = MimeText ( '<P> this is the body of the page </ P>', 'HTML', 'UTF-. 8')
Message [ ' the From '] =' xiatian '
Message [' the To '] =' Dongtian '
Message [' the Subject '] =' Big title '
SMTP = smtplib.SMTP ()
smtp.connect (Server, 25)
smtp.login (Nam, PW )
smtp.sendmail (the send, receive, message.as_string ())
smtp.quit ()
Print ( 'e-mail sent successfully, please check')

 

 

Guess you like

Origin www.cnblogs.com/canglongdao/p/12013291.html
Recommended