E13 9AZ
Jan 17th 2006, 4:02 am
Im not getting much help from my host on this one could some one help me please.
Here is the PHP script that I use on 5 other host accounts and they all work apart from this host!
<?php
$subject = 'Enquiry';
$emailadd = 'email here';
$url = 'success.htm';
$req = '1';
// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "";die;}
}
$j = strlen($key);
if ($j >= 30)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
It appears to send with no server error shown, however no information is being sent to the email address. I have tried lots of different email accounts and nothing arrives to any of them.
Here are some details of the cPanel if this helps...
Operating system Linux
Kernel version 2.4.21-9.0.3.EL
Machine Type i686
Apache version 1.3.34 (Unix)
PERL version 5.8.1
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
PHP version 4.4.1
MySQL version 4.0.22-standard
cPanel Build 10.8.1-RELEASE 113
Theme cPanel X v2.5.0
cPanel Pro 1.0 (RC36)
Thanks very much!
Here is the PHP script that I use on 5 other host accounts and they all work apart from this host!
<?php
$subject = 'Enquiry';
$emailadd = 'email here';
$url = 'success.htm';
$req = '1';
// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "";die;}
}
$j = strlen($key);
if ($j >= 30)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
It appears to send with no server error shown, however no information is being sent to the email address. I have tried lots of different email accounts and nothing arrives to any of them.
Here are some details of the cPanel if this helps...
Operating system Linux
Kernel version 2.4.21-9.0.3.EL
Machine Type i686
Apache version 1.3.34 (Unix)
PERL version 5.8.1
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
PHP version 4.4.1
MySQL version 4.0.22-standard
cPanel Build 10.8.1-RELEASE 113
Theme cPanel X v2.5.0
cPanel Pro 1.0 (RC36)
Thanks very much!