J
John
My web site provider has trouble getting sendmail to work.
This is a trimmed down versio on a perl file that used to work just fine for
years and then it quit working. I've contacted them to no avail:
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print '<html><head>';
print '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
print '</head><body>';
$i=0;
&testmail;
print "Testing email $i <br>(1=success, 0=fail)<br>";
print "</body></HTML>";
sub testmail
{
#open(MAIL,"|/usr/sbin/sendmail -t") || return 0;
open(MAIL,"|/usr/lib/sendmail -t") || return 0;
#open(MAIL,"|/usr/bin/sendmail -t") || return 0;
select (MAIL);
print "To: blahblah\@whatever.com\n";
print "From: blahblah\@whatever.com\n";
print "Subject: testing\n";
print "\n";
print "This is message.\n";
close(MAIL);
select (STDOUT);
$i=1;
}
The code returns:
"Testing email 1
(1=success, 0=fail)"
but no email ever gets to the receiver (yes, I tried with actual working
addresses).
It works just fine on another domain host provider but I need to get it to work
on this particular.
What alternatives can I try?
This is a trimmed down versio on a perl file that used to work just fine for
years and then it quit working. I've contacted them to no avail:
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print '<html><head>';
print '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
print '</head><body>';
$i=0;
&testmail;
print "Testing email $i <br>(1=success, 0=fail)<br>";
print "</body></HTML>";
sub testmail
{
#open(MAIL,"|/usr/sbin/sendmail -t") || return 0;
open(MAIL,"|/usr/lib/sendmail -t") || return 0;
#open(MAIL,"|/usr/bin/sendmail -t") || return 0;
select (MAIL);
print "To: blahblah\@whatever.com\n";
print "From: blahblah\@whatever.com\n";
print "Subject: testing\n";
print "\n";
print "This is message.\n";
close(MAIL);
select (STDOUT);
$i=1;
}
The code returns:
"Testing email 1
(1=success, 0=fail)"
but no email ever gets to the receiver (yes, I tried with actual working
addresses).
It works just fine on another domain host provider but I need to get it to work
on this particular.
What alternatives can I try?