import smtplib
from email.mime.text import MIMEText
mailserver = "smtp.163.com"
username_send = 'tccwpl@163.com'
password = '邮箱的客户端授权码'
username_recv = '996214487@qq.com'
mail = MIMEText('彭彭你好哇')
mail['Subject'] = '彭彭'
mail['From'] = username_send
mail['To'] = username_recv
smtp = smtplib.SMTP(mailserver,port=25)
# smtp=smtplib.SMTP_SSL('smtp.qq.com',port=465)
smtp.login(username_send,password)
smtp.sendmail(username_send,username_recv,mail.as_string())
smtp.quit()
print ('success')

 

相关文章:

  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2021-07-16
  • 2021-07-29
相关资源
相似解决方案