I have a fellin gmy host is blocking the send function but I can not get an answer from them. I have even moved the files to another site but stillnot working. Can some help why the form is not being mailed? I have attached my phpform and the website where it is.
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','FullName');
pt_register('POST','PhoneNumber');
pt_register('POST','EmailAddress');
pt_register('POST','Howdidyouhearaboutus');
$Howdidyouhearaboutus=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Howdidyouhearaboutus);if($FullName=="" || $PhoneNumber=="" || $EmailAddress=="" || $Howdidyouhearaboutus=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Full Name: ".$FullName."
Phone Number: ".$PhoneNumber."
Email Address: ".$EmailAddress."
How did you hear about us: ".$Howdidyouhearaboutus."
";
$message = stripslashes($message);
mail("sherri@sherridesign.com","Password Request",$message,"From:http://www.quantumdatingclub.com/request.html");
Your change still does not follow typical "From:" syntax. Although this field is typically not filled in on most phpFormgenerator forms, your host may apply more strict requirements.
First identify the following for a failing case:
1.) The "To:" email address.
2.) The "From:" email address, or string.
Report these to your host along with a copy of the line in your process.php file that specifies the syntax for the mail() function. Ask if they know of any reason why this email (mail() function) shoud fail. Submit a form and write down the time. Ask your host if they can identify a log (at the time recorded) that indicates that this email is sent or rejected. Logs should be capable of reporting success or failure.
I can take a copy of your form and test it on my site if you still have issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have moved it to another site (sherridesign.com that has a different host) and I have no problem at all? I have done what you requested by sending a support to the other hosting company.
sherri
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
shows as this now
$message = stripslashes($message);
mail("sherri@sherridesign.com","Form Submitted at your website",$message,"From:Quantum Dating Club");
?>
How do i see if they are blocking it. I have this program on another site infact 3 sites and they all work fine.
sherri
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having a problem getting my form results mailed to me. My web host suggested the phpFormGenerator. I don't know much about php or html. I'll copy and paste my processor.php file here:
mail("rubicksman@rubicksman.com","phpFormGenerator - Form submission","Form data:
Suggestions: " . $_POST['field_1'] . "
powered by phpFormGenerator.
");
include("confirm.html");
?>
That is the entire thing. The only thing I changed was the email because I had a gmail address in there but then I changed it to the rubicksman.com email because that is an email on my domain and I thought that the gmail address might have been the problem. I'd appreciate some help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is not much of a process.php file. Are you using the new version 3? Some hosts or email servers are getting tough on "strange" emails. From your example you provided it looks like there is no "From:" field. The "From:" address should also look like a valid email address. Try using a valid email address in the "From:" field.
I have a fellin gmy host is blocking the send function but I can not get an answer from them. I have even moved the files to another site but stillnot working. Can some help why the form is not being mailed? I have attached my phpform and the website where it is.
http://www.quantumdatingclub.com/request.html
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','FullName');
pt_register('POST','PhoneNumber');
pt_register('POST','EmailAddress');
pt_register('POST','Howdidyouhearaboutus');
$Howdidyouhearaboutus=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Howdidyouhearaboutus);if($FullName=="" || $PhoneNumber=="" || $EmailAddress=="" || $Howdidyouhearaboutus=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Full Name: ".$FullName."
Phone Number: ".$PhoneNumber."
Email Address: ".$EmailAddress."
How did you hear about us: ".$Howdidyouhearaboutus."
";
$message = stripslashes($message);
mail("sherri@sherridesign.com","Password Request",$message,"From:http://www.quantumdatingclub.com/request.html");
header("Refresh: 0;url=http://www.quantumdatingclub.com/thankyou.html");
?><?php
}
?>
Try removing the URL from the "From:" section of the mail function. This may be interpreted as spam or dangerous email.
Your change still does not follow typical "From:" syntax. Although this field is typically not filled in on most phpFormgenerator forms, your host may apply more strict requirements.
First identify the following for a failing case:
1.) The "To:" email address.
2.) The "From:" email address, or string.
Report these to your host along with a copy of the line in your process.php file that specifies the syntax for the mail() function. Ask if they know of any reason why this email (mail() function) shoud fail. Submit a form and write down the time. Ask your host if they can identify a log (at the time recorded) that indicates that this email is sent or rejected. Logs should be capable of reporting success or failure.
I can take a copy of your form and test it on my site if you still have issues.
I have moved it to another site (sherridesign.com that has a different host) and I have no problem at all? I have done what you requested by sending a support to the other hosting company.
sherri
Nothing changed.
shows as this now
$message = stripslashes($message);
mail("sherri@sherridesign.com","Form Submitted at your website",$message,"From:Quantum Dating Club");
?>
How do i see if they are blocking it. I have this program on another site infact 3 sites and they all work fine.
sherri
thank you everyone.
sherri
Your Form Looks good. You probably figured it out but for people looking:
Some web hosts block sending from any address other than one hosted at the server.
So, to correct the problem simply make the From: info@thedomainwheretheformis.com
I'm having a problem getting my form results mailed to me. My web host suggested the phpFormGenerator. I don't know much about php or html. I'll copy and paste my processor.php file here:
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
mail("rubicksman@rubicksman.com","phpFormGenerator - Form submission","Form data:
Suggestions: " . $_POST['field_1'] . "
powered by phpFormGenerator.
");
include("confirm.html");
?>
That is the entire thing. The only thing I changed was the email because I had a gmail address in there but then I changed it to the rubicksman.com email because that is an email on my domain and I thought that the gmail address might have been the problem. I'd appreciate some help.
This is not much of a process.php file. Are you using the new version 3? Some hosts or email servers are getting tough on "strange" emails. From your example you provided it looks like there is no "From:" field. The "From:" address should also look like a valid email address. Try using a valid email address in the "From:" field.
mail("rubicksman@rubicksman.com",
"phpFormGenerator - Form submission",
"Form data: Suggestions: " . $_POST['field_1'] . "",
"email@yourdomain.com");