Mail and text extraction

Dino Levy dino_levy at mindlessSPAM.com
Sun Apr 20 19:19:57 EDT 2003


I have the following problem:
I'm trying to make a script which will connect to POP3 server, print
number of mails, print their size and subject, and then will ask the user
which mail should be downloaded...
So far so good, but I have problem: I also want to implement the option
for my script to search for a previously determined pattern and then
download the text with the pattern. I know I sound weird and am not
clearly explaining the problem, but this is a short example...
You get a mail with a subject Monthly payment, and it's fairly large but
all you want to do is to download ( or see ) whether you have been given
a raise. The
mail looks like this:
Agnell company

-Worker		Payment
Joe Doe		500$
Mary Smith	550$
Karen Bay	495$

-New Employee: Peter Maley

some text...

-Raises:
some text

And all you want to do is to connect to your POP3 server, and download
the section called Raises ( for example, two or three lines after the
title ), so all you want to do is to download those few lines containing your
text... ( ONLY those lines, not the whole e-mail )
I know my explanation is lame and clumsy and my english is poor, but
please help me if you understand what I'm talking about and if you have
the solution...
Thanks




More information about the Python-list mailing list