python登录pop3邮件服务器接收邮件详解编程语言

import poplib, string 
PopServerName = "mail.yourserver.com" 
PopServer = poplib.POP3(PopServerName) 
  
print PopServer.getwelcome() 
PopServer.user('yourName') 
  
PopServer.pass_('yourPass') 
r, items, octets = PopServer.list() 
msgid, size = string.split(items[-1]) 
r, msg, octets = PopServer.retr(msgid) 
msg = string.join(msg, "/n") 
print msg 
 

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/8357.html

(0)
上一篇 2021年7月18日 19:33
下一篇 2021年7月18日 19:33

相关推荐

发表回复

登录后才能评论