How to save a email message?

TheSaint nobody at nowhere.net.no
Sat Jul 2 16:35:25 CEST 2011


Steven D'Aprano wrote:

Thank you very much.

> But if you seek back to the beginning:
> 
>>>> x.seek(0)
> 0
>>>> x.read()
> b'hello'
> 

Found the matter and *is* working
I discover another problem:
one message contains also a different encoding, but mostly it is not 
possible to represent that writing on the normale console output.

> 
>>>>> from mailbox import mbox as Mbx
> 
> raises eyebrow
> 
> Do you need to rename mbox? You don't even save a keypress:
> shift-m b x and m b o x both take 4 keypresses.

You stroke a right point :D
I could just use its own name

The code was not exactly run from the python shell. I was trying to make a 
*complete* picture from my module. In fact there aren't the arguments to 
access the pop server.
I'd like to mention that I've looked into the output file, which shows only 
"From MAILER DEAMON" + date of the action, but no message at all.

-- 
goto /dev/null



More information about the Python-list mailing list