PDA

View Full Version : syntax OK'd sendmail not working


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";
}

sir pannels
08-18-2005, 02:15 PM
Hi Bazz,

So the old file still works? Have you tested it since you created this file?

What are the permissions on both of these files? and their real paths?

Cheers

bazz
08-18-2005, 09:11 PM
Uh blimey, :(

Just checked my other 'contact' form and it's now not working either. Strange but it must surely be the ISP who has made a change because I haven't modded the form for about 4 months.

Bazz

sir pannels
08-20-2005, 01:54 PM
Bazz, do you have shell access ?

If is not erroring and just not sending email, check the path to sendmail, nothing else your ISP can change would effect it really, unless they have removed your permissions to send mail.

bazz
08-20-2005, 02:03 PM
Hi,

no shell access. My isp 'fixed' somehting yesterday and I was awash with about 200 emails :eek:

dunno what they did, they haven't explained yet.

Bazz