use Mime::Lite; use Text::ParseWords; # $address is actually taken from a combo box on a web page # but equals the definition below. # That's why I have done the array like this. $address='one@example.com, two@example.com, three@example.com'; @addresses = parse_csv($address); while(@addresses) { my $msg = MIME::Lite-> new( From => 'sender@example.com', To => shift(@addresses), Subject => 'Subject', Type => 'text/plain', Data => 'Body text here.' ); $msg-> send('smtp', "mysmtp.server.com", Timeout=>60); } .... sub parse_csv { return quotewords("," => 0, $_[0]); }