bazz
08-18-2005, 12:32 PM
Hello peeps,
This sendmail has been copied from another of my files on the same server, where it works :)
However, in the new file, on the same server, the sub routine runs but I get no mail :(
I can't find anything wrong and wonder if the ISP may have made some changes to their server, though they say not. I am out of ideas and need your help, please.
Bazz
sub sendmail {
# Path to sendmail (default /usr/sbin/sendmail)
my $mail_prog = '/usr/sbin/sendmail';
open(MAIL,"| $mail_prog -t -oi") or die print "Fail to open sendmail: $!\n";
my $email = $query->param('email');
if (!$email) {
print "You have failed to enter an email address and so, your application has not been processed this time. Please use the back button of your browser to try again. Thank you";
} else {
print MAIL "To: admin\@mydomain.com\n";
print MAIL "From: ".$query->param('email')."\n";
print MAIL "Subject: Subject\n\n";
print MAIL "Submitted By: sendername\n";
print MAIL "Sender Email: senderemail\n";
print MAIL "----------------------------------------------\n";
print MAIL "Questions or Comments:\n";
print MAIL "messagebody\n";
print MAIL "sendername came to the form from: Referer\n";
close(MAIL);
print "sub runs";
}
This sendmail has been copied from another of my files on the same server, where it works :)
However, in the new file, on the same server, the sub routine runs but I get no mail :(
I can't find anything wrong and wonder if the ISP may have made some changes to their server, though they say not. I am out of ideas and need your help, please.
Bazz
sub sendmail {
# Path to sendmail (default /usr/sbin/sendmail)
my $mail_prog = '/usr/sbin/sendmail';
open(MAIL,"| $mail_prog -t -oi") or die print "Fail to open sendmail: $!\n";
my $email = $query->param('email');
if (!$email) {
print "You have failed to enter an email address and so, your application has not been processed this time. Please use the back button of your browser to try again. Thank you";
} else {
print MAIL "To: admin\@mydomain.com\n";
print MAIL "From: ".$query->param('email')."\n";
print MAIL "Subject: Subject\n\n";
print MAIL "Submitted By: sendername\n";
print MAIL "Sender Email: senderemail\n";
print MAIL "----------------------------------------------\n";
print MAIL "Questions or Comments:\n";
print MAIL "messagebody\n";
print MAIL "sendername came to the form from: Referer\n";
close(MAIL);
print "sub runs";
}