twisted15 mail_client
来源:互联网 发布:印度巴基斯坦 知乎 编辑:程序博客网 时间:2024/05/18 22:40
from twisted.internet import reactorfrom twisted.mail.smtp import sendmailfrom twisted.python import logfrom email.mime.text import MIMETextimport syslog.startLogging(sys.stdout)#host = 'aspmx.l.google.com'host = 'localhost'sender = 'secretadmirer@example.com'#receipients = ['twistedechobot@gmail.com']receipients = ['recipients@localhost']#receipients = ['twisted@example.com']msg = MIMEText('''Violets are blueTwisted is helpingForge emails to you!''')msg['subject'] = 'Roses are red'msg['from'] = '"Secret Admirer" <%s>' % (sender,)msg['to'] = ','.join(receipients)#deferred = sendmail(host,sender,receipients, msg.as_string(),port=25)deferred = sendmail(host, sender,receipients, msg.as_string(),port=2500)deferred.addBoth(lambda x:reactor.stop())reactor.run()
0 0
- twisted15 mail_client
- ViewPager简单使用步骤
- 二叉树性质
- CAFFE提取特征并可视化
- 切换同一个按钮的状态
- 使用Jstl异常:HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in
- twisted15 mail_client
- iOS之集合对象:将NSArray和NSDictionary两个集合对象写到一个文件中
- jqmobi(appframework) 小技巧记录
- Line of Sight - POJ 2074 直线交点
- 初识Duilib界面库
- codeforces 571B Minimization(dp)
- 二叉树
- twisted16 mail_stmp
- atlassian JIRA 插件开发(五) — workflow condition、validator和post functions