Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've been using the following code for years. Suddenly it stopped working. Here is a sendmail test I'm running on the host account:
#!/usr/bin/perl -w BEGIN { open (STDERR, ">error.txt") || die("Sorry - cannot open error.txt"); } use CGI qw(:cgi-lib); use CGI::Carp qw(fatalsToBrowser); use strict; my($email_body, $sender, $mail_program, $email_to, $email_subject); $email_body="Surely CPC is not alone as a victim of this relatively ne +w behavior. \n"; $email_to='arthurdoyle1@aol.com'; $sender='cpc@meshingwithgears.us'; $mail_program = "/usr/lib/sendmail -f$sender -t"; open(MAIL,"|$mail_program") || die("Sorry - Cannot open mail program. +Please contact our website via E-mail or try again later."); print MAIL "Reply-to: $sender\n"; print MAIL "To: $email_to\n"; print MAIL "From: $sender\n"; print MAIL "Subject: $email_subject\n"; print MAIL "Content-type: text/plain\n\n"; print MAIL "$email_body"; close (MAIL); print "</BODY></HTML>";; exit;
Error.txt file returns this line:
Mon Jan 30 14:37:09 2017 esender.cgi: Can't exec "/usr/lib/sendmail": No such file or directory at esender.cgi line 24.
Isn't sendmail part of the original PERL installation?
Trying for two weeks to resolve this with Host Support and so far, getting nowhere.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PERL Sendmail Problem
by Corion (Patriarch) on Jan 30, 2017 at 20:05 UTC | |
by Anonymous Monk on Jan 30, 2017 at 22:10 UTC | |
by Anonymous Monk on Jan 30, 2017 at 21:20 UTC | |
by pryrt (Abbot) on Jan 30, 2017 at 21:59 UTC | |
by kcott (Archbishop) on Jan 31, 2017 at 06:16 UTC | |
by AnomalousMonk (Archbishop) on Jan 30, 2017 at 21:36 UTC | |
|
Re: PERL Sendmail Problem
by FreeBeerReekingMonk (Deacon) on Jan 31, 2017 at 19:27 UTC |