sliver has asked for the wisdom of the Perl Monks concerning the following question:
any suggestions?use Email::Filter; use Mail::Sendmail; BEGIN { $mail = Email::Filter->new(); $mail->exit(0); } my $to = $mail->to; my $from = $mail->from; my $subject = $mail->subject; my $body = $mail->body; open (LOG, qq|>>MAIL.txt|); print LOG qq|TO => $to\n|; print LOG qq|FROM => $from\n|; print LOG qq|SUBJECT => $subject\n|; print LOG qq|BODY => $body\n|; close (LOG); END { my %hash = ( to => $from , from => 'foo@bar.com' , subject => 'Mail recieved' , body => 'Your message has been received' , smtp => 'foobar.com' ); open(ERROR, qq|>>ERROR.txt|); sendmail(%hash) or print ERROR qq|Couldn't send mail... $!\n|; #uncomment following lines for debugging only print ERROR qq|$Mail::Sendmail::error \n|; print ERROR qq|\$Mail::Sendmail::log says:\n$Mail::Sendmail::log\n +|; close (ERROR); $mail->exit(1); $mail->accept('/dev/null'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email modules
by NetWallah (Canon) on Aug 24, 2004 at 00:33 UTC | |
by sliver (Initiate) on Aug 24, 2004 at 03:23 UTC | |
by NetWallah (Canon) on Aug 24, 2004 at 04:57 UTC | |
|
Re: Email modules
by bgreenlee (Friar) on Aug 24, 2004 at 05:46 UTC |