tags:

views:

76

answers:

1

Hello

I've just been given a project which involves the following steps

  1. Grab an email from a POP3 address
  2. Open an attachment from the email
  3. Extract the To: email address
  4. Add this to a global suppression list

I'd like to try and do this in Python even though I could it in PHP in half the time (this is because I dont know anywhere near as much Python as PHP)

My question would be.

Can anyone recommend a Python library for interacting with email in the way described above?

Many thanks in advance

+2  A: 

Two bits from the standard library: poplib to grab the email via POP3, email to slice and dice it as you wish.

Alex Martelli
Yeah, Python comes batteries included, as usual. For the global suppression list, use shelves so you'll have persistance.
e-satis