I'm unable to save a UnixMailbox correctly

Chris Liechti cliechti at gmx.net
Tue Jan 29 19:01:30 EST 2002


gradha at terra.es (Grzegorz Adam Hankiewicz) wrote in 
news:f4c749a5.0201291538.2cd15616 at posting.google.com:
>...
> The code I am using to save each message is:   
> for f in mail.headers: file.write(f)   mail.rewindbody()   for f in
> mail.fp.readlines(): file.write(f)  ...being mail an rfc822 object
> returned by mailbox' next method.

> The problem  is that the written
> file lacks the initial "From: ", which I am unable to get from the
> rfc822 object.

then try to use "mail.unixfrom" if its empty (shouldn't be in you 
case) just fake one... 
chris

>...


-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list