Emails backup in python 3.2

T

TheSaint

Hello,
I'm looking for an idea how to backup emails retrieved by poplib and save
them into mailbox.mbox file.
The problem is the received message which is a list of bytes streams,
mailbox.mbox don't expect a list.
What conversion should I do?
A file type io.StringIO ?
decoding every bytes stream which might not have any declared codec?

As far as python moved into unicode, why doesn't it handle these undecoded
bytes as it was with strings before?
 
M

Michael Hrivnak

Why not use one of the many projects and products that are designed to
store email? Do you have a special reason for wanting to implement
your own email storage?

I'm thinking that you can use fetchmail with your favorite mail store,
and you won't need to write any code at all.

http://fetchmail.berlios.de/

Michael
 
T

TheSaint

Michael said:
Do you have a special reason for wanting to implement
your own email storage?

Learning python :)

It seems very easy to get my mails with the poplib help.
Usually I work with Kmail which imports mbox files.
I'm not prone to set up a SMTP server on my PC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,187
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top