Forum Moderators: phranque
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
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.