Suppose I had a spreadsheet with columns name, email, and message, and I have a windows computer and an account on a unix server. What do you think the easiest way to turn that into n emails is?
Assuming you don't have any commas in the middle of your CSV records. There is a "message" field in cartesiandemon's spec. Probably safer to use the Perl CSV module.
no subject
Date: 2005-04-12 03:27 pm (UTC)something like (and I can't remember the API for Mail::SMTP so I might be wrong)
use Mail::SMTP
while(<STDIN>)
{
@fields = split(',', $_);
$mess = new Mail::SMTP::Message;
$mess->to($fields[0].' <'.$fields[1].'>');
$mess->from('Bob');
$mess->body($fields[2]);
$mess->send;
sleep(1);
}
Keep the sleep() call in there unless you want to be killed by your postmaster.
no subject
Date: 2005-04-12 03:41 pm (UTC)no subject
Date: 2005-04-12 03:48 pm (UTC)no subject
Date: 2005-04-12 03:51 pm (UTC)Wait, can you have commas in email addresses? :)
no subject
Date: 2005-04-12 05:22 pm (UTC)no subject
Date: 2005-04-13 01:13 pm (UTC)Wait, can you have tabs in email addresses? :)
no subject
Date: 2005-05-09 05:25 pm (UTC)no subject
Date: 2005-05-09 05:44 pm (UTC)