|Keep It Simple, Stupid|
pattern matching and sendmail issuesby csorensen (Beadle)
|on Jun 29, 2000 at 01:31 UTC||Need Help??|
csorensen has asked for the
wisdom of the Perl Monks concerning the following question:
here's the problem (with all code - minus the comments)
I have an html document with a few thousand email addresses in it. I need to extract these email addresses from the document and send an email to each address (not send one email and cc everyone).
1) I need a better pattern for email addresses but I'm very weak in syntax for regular expressions - is there a good place to learn more about regex ??
2) the second script would run MUCH faster if I could put the open and close commands to sendmail outside the loop and just send an email to each address - I don't know how to send an eof to sendmail though .. whenever I move the open and close outside the loop sendmail creates an email message for each address in ONE message and sends that one message to the first address. very discouraging
any ideas ?? please
script 1 - get the addresses
script 2 - send the mail