Python:Hotmail发邮件
import poplib M = poplib.POP3_SSL('pop3.live.com', 995) #Connect to hotmail pop3 server try: M.user(raw_input("username: ")) #Get the username from the standar input M.pass_(raw_input("password: ")) #Get the password from the standar input except: print "username or password incorrect" else: print "Successful login" import smtplib msg = "warning" msg['From'] = "capstons2011jm4@hotmail.com" msg['To'] = "yuxun88@hotmail.com" msg['Subject'] = "hello" s = smtplib.SMTP("smtp.live.com",25) s.sendmail("capstones2011jm4@hotmail.com", "yuxun88@hotmail.com", msg.as_string()) s.quit()
使用Python登陆Hotmail没问题,发送还是有些麻烦。
TypeError: 'str' object does not support item assignment This keep coming up. I have no idea why.谁晓得?指导一二。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)