http://qs1969.pair.com?node_id=410532

use Mail::Sendmail; print "Testing Mail::Sendmail version $Mail::Sendmail::VERSION\n"; print "Default server: $Mail::Sendmail::mailcfg{smtp}->[0]\n"; print "Default sender: $Mail::Sendmail::mailcfg{from}\n"; %mail = ( #To => 'No to field this time, only Bcc and Cc', From => 'Kathleen@integrasoft.info', Bcc => 'gopal.r@integrasoft.info', # only addresses are extracted from Bcc, real names disregarded Cc => 'gubendran.l@integrasoft.info,senthilkumar.k@integras +oft.info', # Cc will appear in the header. (Bcc will not) Subject => 'HELLO FRIENDS', 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION", ); $mail{Smtp} = '192.168.1.5'; # $mail{'X-custom'} = 'My custom additionnal header'; $mail{'mESSaGE : '} = ' Hi Friends, I would like to meet you both of You. When shall we meet. Bye!!! Take Care!!! Yours Lovingly, Kathleen Dooty. '; # cheat on the date: $mail{Date} = Mail::Sendmail::time_to_date( time() - 86400 ); if (sendmail %mail) { print "Mail sent OK.\n" } else { print "Error sending mail: $Mail::Sendmail::error \n" } print "\n\$Mail::Sendmail::log says:\n", $Mail::Sendmail::log;