Help with webform auto reply
Posted: Fri Nov 05, 2010 6:56 am
I am new to php . I've added an auto reply email script to my webform to go out when the summit button is clicked, which works.
The problem I have is that when the email arrives at the destination inbox, it appears to come from anonymous@domainname.com, instead of info@domainname.com. The emails are treated as spam mail and goes directly to the junk box. My web host provider now thinks I am are sending spam mail from our site and temporarily disconnect the page.
Could somone please help me fix this. The script is below
if($_POST['btnSubmit']=="Send")
{
echo "Thank You. Your registration was successfully sent.";
}
$to = "$email";
$from = "info@domainname.com";
$subject = "Registration confirmation";
$body = <<< emailbody
This email confirms your registration. We will contact you as soon as possible
emailbody;
$success = mail($to,$from,$subject,$body,
"From:$from\r\nReply-To:"info@domainname.com";
The problem I have is that when the email arrives at the destination inbox, it appears to come from anonymous@domainname.com, instead of info@domainname.com. The emails are treated as spam mail and goes directly to the junk box. My web host provider now thinks I am are sending spam mail from our site and temporarily disconnect the page.
Could somone please help me fix this. The script is below
if($_POST['btnSubmit']=="Send")
{
echo "Thank You. Your registration was successfully sent.";
}
$to = "$email";
$from = "info@domainname.com";
$subject = "Registration confirmation";
$body = <<< emailbody
This email confirms your registration. We will contact you as soon as possible
emailbody;
$success = mail($to,$from,$subject,$body,
"From:$from\r\nReply-To:"info@domainname.com";