help with rfc822 please :)

Matthew Barre mbarre at mac.com
Sat Mar 4 13:42:04 EST 2000


Can someone help me with the rfc822 module, I read its section in the
library reference, but I'm still having trouble with it. Why doesn't the
following work, and could someone give a small example that is similar and
does work?

import poplib, rfc822

mserver = poplib.POP3('mail.server.com')
mserver.getweclome()
mserver.user('myname')
mserver.pass_('pass')
nmsg = open('inbox','w')
nmsg = mserver.retr(1)    #retrieve a message and assign it to a variable
rmsg = rfc822.Message(nmsg) #create new message instance using rfc module
print rmsg.getaddr('From') #attempt to retrieve the from


I've never been able to get anything but a none back. Thanks in advance for
any help offered.

-Matt
---------
"Ray! When someone asks you if you're a god, you say YES!!" -Winston Zedmore




More information about the Python-list mailing list