a simple email test in python

来源:互联网 发布:mac腾讯视频文件位置 编辑:程序博客网 时间:2024/05/16 04:13

!/usr/bin/python

-- coding:utf-8 --

import os
import smtplib

fromAddress=’########@163.com’
toAddress=’****@qq.com’
msg=”Subject:Hello\n\n This is the body of the message.”
server = smtplib.SMTP(“smtp.163.com”,25)
server.sendmail(fromAddress,toAddress,msg)

0 0
原创粉丝点击