padawan_linuxero has asked for the wisdom of the Perl Monks concerning the following question:
use Mail::Sendmail; $Mail::Sendmail::VERSION\n"; [0]\n"; %mail = ( To => 'a.gz@at.com', From => 'a.gz@at.com', Cc => 'a@gmail.com', Subject => 'Test message', 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION", ); $mail{Smtp} = 'sis.at.com'; $mail{'X-custom'} = 'My custom additionnal header'; $mail{'mESSaGE : '} = "The message key looks terrible, but works."; $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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Send email error
by perlfan (Parson) on Oct 16, 2007 at 16:18 UTC | |
by padawan_linuxero (Scribe) on Oct 16, 2007 at 16:25 UTC | |
by Fletch (Bishop) on Oct 16, 2007 at 18:25 UTC | |
by pileofrogs (Priest) on Oct 16, 2007 at 18:12 UTC | |
|
Re: Send email error
by jdporter (Paladin) on Oct 16, 2007 at 16:15 UTC | |
|
Re: Send email error
by dwm042 (Priest) on Oct 16, 2007 at 18:28 UTC |