in reply to multiple CC using sendmail



Try this code.

#!C:/Perl/bin/perl.exe
use MIME::Lite;
MIME::Lite->send('smtp', "mailtesthub.gmail.com", Timeout=>90);
my $email = "This email was generated automatically.";
my $subject = "hello test";
my $MailFrom = "john@gmail.com";
my $to_list = 'frank@yahoo.com,kannan@gmail.com,stepen@gmail.com';
my $cc_list = 'sam@rediffmail.com,goerge@gmail.com,jansi@yahoo.com';
my $bcc_list = 'yami@yahoo.com,bala@yahoo.com';
$msg = MIME::Lite->new(
From => $MailFrom,
To => $to_list,
Cc => $cc_list,
Bcc => $bcc_list,
Subject => $subject,
Type => 'TEXT',
Encoding=> '7bit',
Data => $a
);
$msg->send()

Replies are listed 'Best First'.
Re^2: multiple CC using sendmail
by Anonymous Monk on Jul 02, 2014 at 21:47 UTC
    Use the option -t to send it to multiple addresses in the "To" field.