Hi All, I'm hoping someone can help me here. Basically. one of my clients just recently decided to switch her site to my reseller account. However, her email is being hosted elsewhere, so I updated the MX record accordingly. The question I have is regarding a form I have coded in PHP. The results are programmed to go to her domain email address. The problem is that she never receives the results of the form - instead the results are sent to the "catch-all" email address on my reseller server (under her account). She should be getting those results on her email hosted server. Why does this happen? Do I have to update the programming? Here's the code:
<?
$yourname = "John Doe";
$email = "info@domainname.com";
$subject = "Form Submitted from DomainName.com";
$sitename = "Website Name";
function is_email_valid($contact_email) {
if(eregi("^[a-z0-9._-]+@+[a-z0-9._-]+.+[a-z]{2,3}$", $contact_email)) return TRUE;
else return FALSE;
}
if (is_email_valid($contact_email))
{
$recipient = "$yourname <$email>";
$message = “results are emailed in HTML format";
$headers = "From: $contact_name <$contact_email>rnReply-To: $contact_emailrn";
$headers .= "Content-Type: text/html; charset=iso-8859-1";
mail ($recipient, $subject, $message, $headers);
header ("Location: http://www.domainname.com/Contact/missing_field.htm");
}
else
{
header ("Location: http://www.domainname.com/Contact/email_error.htm");
}
?>
Any advice would be helpful. Thanks!