skirrow has asked for the wisdom of the Perl Monks concerning the following question:
$mail_method = "1"; $mail_program = "/usr/sbin/sendmail"; $email_from = 'test@domain.com'; $email_to = 'neil@domain.com'; $email_subject = 'foo'; $email_text = 'bar'; $msg = MIME::Lite->new( From =>'$email_from', To =>'$email_to', Subject =>'$email_subject', Type =>'multipart/mixed', Data =>'$email_text' ); #if ($email_attach) { #$msg->attach( # Type =>'$email_attach_type', # Path =>'$email_attach_path', # Filename =>'$email_attach_file', # Disposition => 'attachment' #); #} if ($mail_method eq "1") { MIME::Lite->send("sendmail", "$mail_program"); } elsif ($mail_method eq "2") { MIME::Lite->send('smtp', "$smtp_address", Timeout=>$smtp_timeout); } $msg->send || die "sendmail failed";
No errors are returned and no email is sent, nothing. The software just runs as normal and no email is received.
All suggestions/help is very much appreciated.
Thanks, Neil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite
by jasonk (Parson) on Apr 08, 2003 at 16:40 UTC | |
|
Re: MIME::Lite
by Tomte (Priest) on Apr 08, 2003 at 16:02 UTC | |
by Anonymous Monk on Apr 08, 2003 at 16:16 UTC | |
|
Re: MIME::Lite
by Mr. Muskrat (Canon) on Apr 08, 2003 at 16:09 UTC | |
by jasonk (Parson) on Apr 08, 2003 at 16:35 UTC | |
by Mr. Muskrat (Canon) on Apr 08, 2003 at 16:41 UTC | |
by skirrow (Novice) on Apr 08, 2003 at 16:27 UTC | |
|
MIME::Lite installation on windows
by naveenkgr (Initiate) on Jun 29, 2010 at 06:03 UTC | |
by planetscape (Chancellor) on Jun 29, 2010 at 07:17 UTC |