michaelpalmer7 Posted March 5, 2008 Share Posted March 5, 2008 Hi there I am setting up a website with a form that enables the customer to select some options, enter they're name and email and when they hit submit an email will be sent to them telling them what they have chosen and giving them a price. and a seperate email will be sent to me telling me they have submitted a quotation. If i fill the form in as a customer with an email form one of my websites it works perfectly. However if i try it with a hotmail or gmail address the email doesnt even show up even when i add the domain to the allowed list. Here is my sendmail form: <?php /*Here we are going to declare the variables*/ $title = $_REQUEST['title']; $name = $_REQUEST['name']; $surname = $_REQUEST['surname']; $email = $_REQUEST['email']; $package = $_REQUEST['package']; $pages = $_REQUEST['pages']; $contactform = $_REQUEST['contactform']; $pricepage = $_REQUEST['pricepage']; $gallery = $_REQUEST['gallery']; if ($package == "150") { $packagepage = "3"; } if ($package == "180") { $packagepage = "5"; } if ($package == "300") { $packagepage = "10"; } $recipient1 = "info@mydomain.co.uk"; $recipient2 = $email; $subject = "Web Design Quotation"; $mailheader = "From:$email\r\n"; $totalpages = $pages*25; $totalcontactform = $contactform*20; $totalpricepage = $pricepage*10; $totalgallery = $gallery*20; $totalprice = $package + $totalpages + $totalcontactform + $totalpricepage + $totalgallery; //Save name and entered message into one variable: $names= "WEB DESIGN QUOTATION\n\n Dear $title $surname"; $detailsandprice= "Thankyou for your quotation, details are shown below.\n\nDETAILS\n\n$packagepage page package £ $package\n\n$pages Extra Page/s £ $totalpages\n\n$contactform Contact/Booking Form/s £ $totalcontactform\n\n$pricepage Price Page/s £ $totalpricepage\n\n$gallery Gallery Page/s £ $totalgallery\n\n\n\nTotal Price of website design and construction = £ $totalprice "; $formcontent= "$names\n\n$detailsandprice"; $formcontent2= "WEB DESIGN QUOTATION\n\n$title $name $surname has submitted a quotation for: /n/nDETAILS\n\n$packagepage page package £ $package\n\n$pages Extra Page/s £ $totalpages\n\n$contactform Contact/Booking Form/s £ $totalcontactform\n\n$pricepage Price Page/s £ $totalpricepage\n\n$gallery Gallery Page/s £ $totalgallery\n\n\n\nTotal Price of website design and construction = £ $totalprice\n\nEmail:$email"; if (!isset($_REQUEST['email'])) { header( "Location: http://www.mydomain.co.uk/" ); } elseif (empty($email)) { ?> <html> <head> </head> <body bgcolor="#C0C0C0"> <p align="center"><font face="Calligraph421 BT" size="6">Web Design: <b><u><font color="#FF0000"></font></u></b></font></p> <p align="center"><font face="Arial" size="5">You haven't included an email address so we cannot reply, please click <a href="javascript:history.back()"> HERE</a> to return and include an email address.</font></p> </body> </html> <? } else { mail( $email, $subject, $formcontent, "From: info@mydomain.co.uk\" ); mail( "info@mydomain.co.uk", $subject, $formcontent2, "From: $email\" ); header( "Location: http://www.mydomain.co.uk/thankyou.htm" ); } ?> ?> I have researched this with little luck and think it has something to do with the headers. I have also emailed hotmail describing the problem. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 5, 2008 Share Posted March 5, 2008 look around the forum I have posted what headers should be part of a good email message, and odds are gmail/hotmail are bouncing you for lack of header data Quote Link to comment Share on other sites More sharing options...
michaelpalmer7 Posted March 6, 2008 Author Share Posted March 6, 2008 I think you're right im pretty convinced it is a problem with the headers but i have been looking on the net and tried a few with no success i cant find an actual solution to the problem anywhere and im going through the painful process of contacting hotmail at the moment. Quote Link to comment Share on other sites More sharing options...
haku Posted March 6, 2008 Share Posted March 6, 2008 Try using the free phpmailer class. Google it. It has an easy to use tutorial on the site where you can see how to put it together. Its a good program, and it will stop programs from filtering your mails. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.