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