Email processing in Python

Bill Campbell freebsd at celestial.com
Mon Mar 24 13:22:37 PDT 2008


On Mon, Mar 24, 2008, Giorgos Keramidas wrote:
>On Mon, 24 Mar 2008 15:12:03 -0400, Robert Huff <roberthuff at rcn.com> wrote:
>>Giorgos Keramidas writes:
>>> No, there's no library for `email processing' in the C standard.  You
>>> can probably find a lot of non-standard ones, by Googling however :)
>>>
>>> It's worth writing that plain C is the wrong language for this
>>> sort of thing, if you ask me.  There are excellent high-level
>>> libraries in Perl, and Python to do this sort of thing.
>>
>> On one hand, that's probably true.
>>
>> On the other hand: I know zero Python and this much > < Perl.  I tried
>> Perl, actually, and couldn't find the functions I needed.
>
>Heh, fair enough.  It may be a good chance to start learning Python
>though.  It's always a lot more fun to have a *real* task to do, instead
>of fictional `exercises'.
>

Python has quite a few routines that handle e-mail which are well
documented in the Python Library Reference:

	http://docs.python.org/lib/lib.html

The ``email'' module does much the same as the perl Mail::Internet 
modules (I've written a wrapper for python's email library that
basically implements the perl API to make porting my old perl
routines to python :-).

The ``poplib'' and ``imaplib'' modules make accessing POP and
IMAP servers pretty easy as well.

Bill
--
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Democracy Is Mob Rule with Income Taxes


More information about the freebsd-questions mailing list