python发送邮件会的进来帮帮忙

天蝎座的贱人 2010-01-14 05:35:30
代码在这个连接
http://blog.donews.com/maverick/archive/2007/04/22/1159142.aspx
方法def sendEmail(authInfo, fromAdd, toAdd, subject, plainText, htmlText):

这个方法是不是单独就可以拿出来用 如果可以其中的参数谁能给说一下
给填个例子 不胜感激
...全文
113 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
thy38 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 scopop 的回复:]
多谢 很明确 那个toadd是都列表吧 群发用的?是吗
[/Quote]是的,不过EMail不用群发这个词,一般用‘抄送’和‘密送’
天蝎座的贱人 2010-01-15
  • 打赏
  • 举报
回复
多谢 很明确 那个toadd是都列表吧 群发用的?是吗
天蝎座的贱人 2010-01-15
  • 打赏
  • 举报
回复
非常感谢
thy38 2010-01-14
  • 打赏
  • 举报
回复
authInfo —— 邮箱服务器地址、用户名、密码
fromAdd —— 发件人地址
toAdd —— 收件人地址
subject —— 主题
plainText —— 普通文本
htmlText —— HTML文本
authInfo = {}
authInfo['server'] = 'smtp.21cn.com'
authInfo['user'] = 'thy38'
authInfo['password'] = 'thy38'
fromAdd = 'thy38@21cn.com'
toAdd = ['scopop@21cn.com', 'thy39@21cn.com']
subject = '邮件主题'
plainText = '这里是普通文本'
htmlText = '<B>HTML文本</B>'
sendEmail(authInfo, fromAdd, toAdd, subject, plainText, htmlText)
sqjunior77 2010-01-14
  • 打赏
  • 举报
回复
好高深~
天蝎座的贱人 2010-01-14
  • 打赏
  • 举报
回复
authInfo['server'] = 'smtp.163.com'服务
authInfo['user'] = 'xxxxx@163.com'发送的邮箱?
authInfo['password'] = '密码'邮箱的密码
fromAdd = 'xxxxxxx@163.com'这个也填发送邮箱?
toAdd = ['someone@somehost.com', 'other@somehost.com']这里面两个参数什么意思

我知道要一个163服务器 一个发送邮箱和密码 还有接受邮箱
然后还需要什么 不懂啊 没接触过 谁明白能给说书不

37,744

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧