I can’t for the life of me figure this out. I have a very simple email form on my site. My hosting service is provided by frynge.com. I emailed them about my question and they gave me a vague evasive answer. Here is the question:
When my site sends a conformation email to my customer after they fill out a form, instead of it saying “from: noreply@gabags.ca” it says its from Nobody <nobody@host.frynge.ca>… ?
here is an example of the email my customer would receive:
from Nobody <nobody@host.frynge.ca>
to [email]myCustomersEmail@anysite.com[/email]
date Aug 15, 2007 5:12 PM
subject GABags Contact Form - Auto Responder
mailed-by host.frynge.ca
Thank You test for submitting your request, GABags has received the following information:
Your name: test
Your Email Address Is: myCustomersEmail@anysite.com
Your Phone Number is: 555-555-1212
The GABag(s) that you are interested in are: testtest
For questions and comments you said: testtesttest
Thank you again for your request. You should be contacted within 48 hours of GABags recieving your email.
Here’s an example of the email I recieve:
from Nobody <nobody@host.frynge.ca>
to myCompanyEmail@anysite.com
date Aug 15, 2007 5:12 PM
subject GABags Contact Form - Customer Request Enclosed
mailed-by host.frynge.ca
test has submited a request and recieved a response email from GABags. Both emails include the details of test’s request.
Details:
Customers name: test
test’s would like some information of these bags: bag1, bag2 test test
test’s Email Address Is: myCustomersEmail@anysite.com
test’s Phone Number Is:
test’s comments and inquiries are as follows: testing is fun, who is nobody?
Contact test within 48 hours from recieving this email.
Here is the form code and php code (minus the full site’s code)
<tr>
<td align="left" valign="top">
<form action="contact.php" method="post" enctype="multipart/form-data" name="contact_form" target="_self">
<table width="450" height="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="204" height="22" class="style5">Your Name:</td>
<td width="246" class="style5"><input name=" customerName" type="text" class="style2" id=" customerName" size="35" style="color:#A92F2F; background:#FEEB84; border:#960014" /></td>
</tr>
<tr valign="top">
<td height="22" class="style5">Your Email Address : </td>
<td class="style5"><input name="customerEmail" type="text" class="style2" id="customerEmail" size="35" style="color:#A92F2F; background:#FEEB84; border:#960014" /></td>
</tr>
<tr valign="top">
<td height="22" class="style5">Your Phone Number: </td>
<td class="style5"><input name="custPhoneNumber" type="text" class="style2" id="customerPhoneNumber" size="12" style="color:#A92F2F; background:#FEEB84; border:#960014" /></td>
</tr>
<tr valign="top">
<td height="22" class="style5">Which GABag are you interested in: </td>
<td class="style5"><input name="gabagInquiry" type="text" class="style2" id="gabagInquiry" size="50" style="color:#A92F2F; background:#FEEB84; border:#960014" /></td>
</tr>
<tr valign="top">
<td height="86" class="style5">Questions or comments: </td>
<td class="style5"><textarea name="comments" cols="35" rows="4" class="style2" id="comments" style="color:#A92F2F; background:#FEEB84; border:#960014"></textarea></td>
</tr>
<tr valign="bottom">
<td height="54" colspan="2"><div align="center">
<input type="submit" value="Submit" name="submit">
<input type="reset" value="Reset" name="reset">
</div></td>
</tr>
</table>
</form>
<?php
if(isset($submit))
{
//variables aquired from the form
$custName = $_POST["customerName"];
$custEmail = $_POST["customerEmail"];
$custPhoneNumber = $_POST["custPhoneNumber"];
$gabagInquiry = $_POST["gabagInquiry"];
$comments = $_POST["comments"];
//end variables aquired from the form
//
//auto-responder
$to = $custEmail;
$subject = "GABags Contact Form - Auto Responder";
$body="Thank You $custName for submiting your request, GABags has received the following information:
Your name: $custName
Your Email Address Is: $custEmail
Your Phone Number is: $custPhoneNumber
The GABag(s) that you are interested in are: $gabagInquiry
For questions and comments you said: $comments
Thank you again for your request. You should be contacted within 48 hours of GABags recieving your email.
";
mail($to,$subject,$body);
//end auto-responder
//
//email send to GABags
$to_2="myCompanyEmail@anysite.com";
$subject_2="GABags Contact Form - Customer Request Enclosed";
$body_2="$custName has submited a request and recieved a response email from GABags. Both emails include the details of $custName's request.
Details:
Customers name: $custName
$custName's would like some information of these bags:
$gabagInquiry
$custName's Email Address Is: $custEmail
$custName's Phone Number Is: $custPhoneNumber
$custName's comments and inquiries are as follows:
$comments
Contact $custName within 48 hours from recieving this email.
";
mail($to_2,$subject_2,$body_2);
//end email send to GABags
//print notification below form after send
print "<p class=\"style5\">Thank you $custName, you will recieve and email confirming your request, GABags has also recieved an Email detailing you request and should contact you within 48 hours</p>
";
}
?>
ok. but when I asked my hosting provider how to change the “From” field from being nobody@host.frynge.ca to noreply@gabags.ca they said:
Frynge Customer Support to me
Hello,
>>when my php form sends and email to me or my customer the email address is <nobody@host.frynge.ca> . How do I get it to say noreply@gabags.ca?<<
You can set it to noreply@gabags.ca by adding a sender field in your PHP forms.
Please let us know if you require any further assistance.
Hells yes I need further assistance.:puzzle:
The hosting service uses Horde and Squirrel Mail for its webmail. I don’t think that I have to change anything in those preferences (at least according to my providers answer lol).
I’ve googled up and down the net for “From Field PHP Forms” etc and nothing, maybe someone can help me here?
HUGE thanks in advance! :krazy:
-Paul