I did a really basic mailer, but I highly recommend Mail::Bulkmail, as it provides many, many more features and error checking etc.
If your are interested:
Mailer:
use strict; use warnings; use Mail::Sendmail; my $from = '"Company Surveys" <surveys@surveys.com>'; my $subject = 'Your Survey'; open LIST, "<mailinglist" or die "Cannot open mailing list: $!"; open MESSAGE, "<mailinglist-message" or die "Cannot open mailinglist message: $!"; my @message = <MESSAGE>; my %mails = ( From => "$from", Subject => "$subject", Message => join "", @message, ); while (<LIST>) { sendmail('To' => $_, %mails) or warn $Mail::Sendmail::error; print "Message has been sent to $_"; }; close LIST; close MESSAGE; print "All e-mails sent successfully.\n\n";
mailinglist-message is something like:
Dear Potential Customer, blah blah From time to time, we would like to send you more surveys and our newsletter. We respect your privacy, therefore, if you wish to unsubscribe from our list, please reply, changing the Subject Line to: unsubscribe
mailinglist is something like:
etc. etc.ghenry@me.com ghenry@me.org gavin.henry@me.com ghenry@me.co.uk ghenry@me.uk
HTH.
In reply to Re: Bulk Mail
by ghenry
in thread Bulk Mail
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |