手机
当前位置:查字典教程网 >脚本专栏 >python >python通过邮件服务器端口发送邮件的方法
python通过邮件服务器端口发送邮件的方法
摘要:本文实例讲述了python通过邮件服务器端口发送邮件的方法。分享给大家供大家参考。具体实现方法如下:fromAddress='sender@...

本文实例讲述了python通过邮件服务器端口发送邮件的方法。分享给大家供大家参考。具体实现方法如下:

fromAddress = 'sender@example.com' toAddress = 'me@my.domain' msg = "Subject: HellonnThis is the body of the message." import smtplib server = smtplib.SMTP("localhost", 25) server.sendmail(fromAddress, toAddress, msg)

希望本文所述对大家的Python程序设计有所帮助。

【python通过邮件服务器端口发送邮件的方法】相关文章:

使用python 获取进程pid号的方法

python列表去重的二种方法

采用python实现简单QQ单用户机器人的方法

python实现问号表达式(?)的方法

python函数返回多个值的示例方法

python生成器的使用方法

python两种遍历字典(dict)的方法比较

python二叉树遍历的实现方法

Python实现扫描指定目录下的子目录及文件的方法

python每次处理固定个数的字符的方法总结

精品推荐
分类导航