FAQ
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?

--
goto /dev/null

Search Discussions

  • Michael Hrivnak at Jun 22, 2011 at 4:20 am
    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
    On Tue, Jun 21, 2011 at 9:03 AM, TheSaint wrote:
    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?

    --
    goto /dev/null
    --
    http://mail.python.org/mailman/listinfo/python-list
  • TheSaint at Jun 22, 2011 at 11:20 am

    Michael Hrivnak wrote:

    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.

    --
    goto /dev/null

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 21, '11 at 1:03p
activeJun 22, '11 at 11:20a
posts3
users2
websitepython.org

2 users in discussion

TheSaint: 2 posts Michael Hrivnak: 1 post

People

Translate

site design / logo © 2022 Grokbase