Ben Densmore wrote:
> I have about 1800 text files that I exported from outlook that are all
> bounced emails. I need to extract the email addresses that were bounced
> back. Unfortunately not all mail servers bounce messages that look
> alike. I was thinking I could just read through each text file and find
> where the email address is but in a lot of the files there will be the
> email address of the person who the email was originally from, the email
> address of the server that bounced the email and the email address who
> it was originally sent to.
>
> The only time these files are consistent is when they were bounced by
> the same mail server software. I was thinking maybe I will loop through
> the ones that are in the same format, i.e. the email address that was
> bad looks like ([EMAIL PROTECTED]) and strip out everything but
> the email address.
That is indeed the way to go. In some cases it is easy, for
instance if you want to get all AOL bounces you can do a simple
regex replace on your email:
REReplaceNoCase(email,"^.*----- The following addresses had
permanent fatal errors -----(.+)----- Transcript of session
follows -----.*$","\1")
Simple patterns like these should find you most of the addresses,
just look for 5xx (permanent) error codes next to an email
address. But it is a case of diminishing returns and at some
point it is easier to do the rest by hand.
Jochem
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Extracting an email address out of a text file Ben Densmore
- Re: Extracting an email address out of a text file Claude Schneegans
- Re: Extracting an email address out of a text f... Bryan F. Hogan
- Re: Extracting an email address out of a text file Jochem van Dieten
- Re: Extracting an email address out of a text f... Scott Weikert
- RE: Extracting an email address out of a text file Ben Densmore
- Re: Extracting an email address out of a text f... Claude Schneegans
- RE: Extracting an email address out of a text file Ben Densmore
- Re: Extracting an email address out of a text f... Claude Schneegans