[Pdx-pm] MIME::Lite question, ... I think

Thomas J Keller kellert at ohsu.edu
Wed Sep 28 12:53:45 PDT 2005


Hi Folks,
I'm trying to send a "fancy" email using HTML::Template and then  
MIME::Lite. The problem is I need to send it to about 100 people. I  
figured I could put the csv list in a variable and MIME::Lite would  
handle it. But it doesn't seem to want to do that. Here's the snippet:

#slurp an comma-separated list of emails
my $csv_emails;
{
     local $\ = undef;
     $csv_emails = <STDIN>;
}
print "$csv_emails\n";

my $msg = MIME::Lite->new(
                  To      => $csv_emails,
                  From      =>  'core at ohsu.edu',
                  Subject => 'Core Facility Update',
                  Type    => 'text/html',
                  Data     => $template->output(),
                  );

$msg->send("smtp", "$smtp_host");

####
Here's the error I get:

$ perl osyn_maill < csv_emails
'kellert at ohsu.edu, kellert at ohsu.edu'
SMTP RCPT command failed:
No such recipient

at /Users/kellert/Sandbox/Perlscripts/osyn_mail.pl line 63

#######

Any suggestions?

Thanks,
Tom K




More information about the Pdx-pm-list mailing list