Forum Moderators: phranque

Message Too Old, No Replies

Getting email addresses out of emails

Making a list of email addresses from Eudora emails

         

CromeYellow

2:31 pm on May 29, 2003 (gmt 0)

10+ Year Member



hi

I wonder if anyone can help save me a monumentally tedious and time-consuming task.

I have around 2000 emails that people have sent to me asking to be notified when a particular product is ready.

Trouble is (stupid, stupid, smacks head) I had them directed to my email inbox instead of to a list, so now I have loads of emails that I want to mail.

The only thing I can think of doing is extracting the email addresses by hand, entering them into a text file and then uploading the hand-built list to my broadcast email service.

Does anyone know a quicker way of doing it?

Thanks in advance

Cy

dkubb

3:07 pm on May 29, 2003 (gmt 0)

10+ Year Member



All email in Eudora is stored within a file format with an extension "mbx". Each folder is one giant file with all the messages appended together. This should make it fairly easy for a programming language to extract the email addresses.

I whipped up the following one-liner in perl that will allow you to extract all the email addresses within a file and print them all to a file (may wrap, should be all one line):


perl -MEmail::Find -ne 'Email::Find->new(sub { print shift->address, "\n" })->find(\$_)' file.mbx > output.txt

Replace "file.mbx" with the name of your mbx file. output.txt is the name of the file that the email addresses will be written out to.

Of course you'll need to have perl installed on your computer. In addition you'll need the library Email::Find, which can easily be installed on a unix-line computer with the following command:


perl -MCPAN -e 'install Email::Find'

If you're on windows, doing the following from the command prompt will do the trick:


ppm.bat install Email::Find

Thats it. All the email addresses will be put into a file, one per line.

CromeYellow

3:20 pm on May 29, 2003 (gmt 0)

10+ Year Member



dkubb, that's beautiful. :)

Perl and me don't mix, but I know a man who can.

Many thanks

Cy

CromeYellow

2:37 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



Just to let you know dkubb, my friend used your routine and I've now got my email addresses. I'll buy you a pint if you come to PubCon ;)

Cy