ironstone Posted January 30, 2009 Share Posted January 30, 2009 Hi Hope someone can help me with this. Form is supposed to allow customer to complete details etc and then send confirmation back to them via e-mail and a copy to me via e-mail. This PHP works fine when hosted by GoDaddy but no e-mails are send when it's hosted by Freeparking. Hoping someone can point out what's wrong with it please. Thank you. <?php echo "<font face='Tahoma'>Please wait collectmyparcel.com is processing your booking ....</font>"; $enquiry_email = "[email protected]"; $email = "[email protected]"; $sitename = "collectmyparcel.com"; $xheaders .= "From: collectmyparcel.com <".$enquiry_email.">\n"; $xheaders .= "X-Sender: <".$enquiry_email.">\n"; $xheaders .= "X-Mailer: PHP\n"; // mailer $xheaders .= "X-Priority: 3\n"; // Urgent message! $xheaders .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type $xheaders .= "Bcc: [email protected] , [email protected] \n"; $message='<FONT SIZE=5 FACE="ARIAL"> <p><div align="center"><img src="http://www.collectmyparcel.com/images/indexlogotop.jpg" width="558" height="93"></p> <p class="style48">Booking Form Confirmation - DHL@Home 48</p></FONT> <FONT SIZE=1 FACE="ARIAL"> <table width="929" align="center"> <tr bordercolor="#003300"> <th width="304" scope="row"><div align="left"><span class="style42">Collection Date</span></div></th> <td width="165"><div align="left"><span class="style46"> '. $_REQUEST["date"] .' </span></div></td> <td colspan="3"><span class="style47"></span></td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"></div></th> <td><span class="style47"></span></td> <td colspan="3"><span class="style47"></span></td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">E-Mail address</span></div></th> <td> <div align="left"> '. $_REQUEST["email"] .' </div></td> <td colspan="3"><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span></td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Name</span></div></th> <td><div align="left"> '. $_REQUEST["coll_name"] .' </div></td> <td width="114" rowspan="8"><div align="left"><img src="http://collectmyparcel.com/images/arrow.jpg" width="93" height="60"></div></td> <td width="292"><div align="left"><span class="style47"><B>Delivery Name</B></span></div></td> <td width="150">'. $_REQUEST["1del_name"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Company</span></div></th> <td><div align="left"> '. $_REQUEST["coll_comp"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Company</B></span></div></td> <td>'. $_REQUEST["1del_comp"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Address 1</span></div></th> <td><div align="left"> '. $_REQUEST["coll_add1"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Address 1</B></span></div></td> <td>'. $_REQUEST["1del_add1"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Address 2</span></div></th> <td><div align="left"> '. $_REQUEST["coll_add2"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Address 2</B></span></div></td> <td>'. $_REQUEST["1del_add2"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Town / City</span></div></th> <td><div align="left"> '. $_REQUEST["coll_town"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Town / City</B></span></div></td> <td>'. $_REQUEST["1del_town"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection County </span></div></th> <td><div align="left"> '. $_REQUEST["coll_county"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery County</B></span></div></td> <td>'. $_REQUEST["1del_county"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Post Code</span></div></th> <td><div align="left"> '. $_REQUEST["coll_postcode"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Post Code</B></span></div></td> <td>'. $_REQUEST["1del_postcode"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"><span class="style42">Collection Phone No</span></div></th> <td><div align="left"> '. $_REQUEST["coll_phone"] .' </div></td> <td><div align="left"><span class="style50"><B>Delivery Phone No</B></span></div></td> <td>'. $_REQUEST["1del_phone"] .'</td> </tr> <tr bordercolor="#003300"> <th scope="row"><div align="left"></div></th> <td><div align="left"><span class="style46"> </span></div></td> <td colspan="3"> </td> </tr> <tr> <th scope="row"><div align="left"></div></th> <td><div align="left"><span class="style47"><span class="style46"> </span></span></div></td> <td colspan="3"><span class="style47"></span></td> </tr> <tr> <th scope="row"><div align="left"></div></th> <td><div align="left"><span class="style47"></span></div></td> <td colspan="3"><span class="style47"></span></td> </tr> <tr> <th scope="row"><div align="left"><span class="style42">Parcel Weight</span></div></th> <td><div align="left"><span class="style47"> '. $_REQUEST["1parcel_weight"] .' </span></div></td> <td colspan="3"><span class="style47"></span><span class="style47"></span><span class="style47"></span><span class="style47"></span></td> </tr> <tr> <th scope="row"><div align="left"><span class="style42">Parcel Dimensions</span></div></th> <td colspan="4"><div align="left"><span class="style46"> '. $_REQUEST["1parcel_length"] .' cm x '. $_REQUEST["1parcel_height"] .' cm x '. $_REQUEST["1parcel_width"] .' cm </span></div></td> </tr> <tr> <th scope="row"><div align="left"><span class="style42">Value</span></div></th> <td><div align="left"><span class="style47"> '. $_REQUEST["1parcel_value"] .' </span></div></td> <td colspan="3"> </td> </tr> <tr> <th scope="row"><div align="left"><span class="style42">Description</span></div></th> <td><div align="left"><span class="style47"> '. $_REQUEST["1parcel_desc"] .' </span></div></td> <td colspan="3"> </td> </tr> </table></FONT>'; $mail_sent = mail($email, "Booking Form - 24-48 Hr 1-2 Day Delivery", $message, $xheaders); $mail_sent = mail($_REQUEST["email"], "Confirmation of Booking - 24-48 Hr 1-2 Day Delivery", $message, $xheaders); $counter = $_REQUEST["1"]; $price = 8.75; ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="form_payapl"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="return" value="http://www.collectmyparcel.com/thankyou_booking.html"> <input type="hidden" name="cancel_return" value="http://www.collectmyparcel.com/services.html"> <input type="hidden" name="amount" value="<?php echo ($price); ?>"> <input type="hidden" name="item_name" value="DHL48 - Parcel Booking for 1 Address"> </form> <script> form_payapl.submit(); </script> Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/ Share on other sites More sharing options...
waynew Posted January 30, 2009 Share Posted January 30, 2009 Have you contacted Freeparking? Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/#findComment-750507 Share on other sites More sharing options...
ironstone Posted January 30, 2009 Author Share Posted January 30, 2009 Hi Yes I have contacted their Support team and they said they're looking into it, but if they are or not who knows. The first time I tried to run the PHP on Freeparking nothing worked. It turned out (with help from a member of this forum) I had <? and the top and not <?php. <? works fine with GoDaddy but not Freeparking. It's as if Freeparking is stricter with it's PHP??? Does the PHP look right do you know? Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/#findComment-750511 Share on other sites More sharing options...
ironstone Posted January 30, 2009 Author Share Posted January 30, 2009 Has anyone any ideas on this. Really need some help. Thanks. Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/#findComment-750543 Share on other sites More sharing options...
jonsamwell Posted January 30, 2009 Share Posted January 30, 2009 Funny enough i'm having a similar problem but my script works fine to external emails just not to network internal emails, The tech support have tracked the error down to the php script producing email containing bare line feed i.e. '\n' as new line characters. The RFC standards say that all '\n' chars should be preceeded by a '\r' o that you always have a carriage feed they a line return so try replacing all your '\n' with '\r\n' . might help worth a try. Regards, Jon Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/#findComment-750585 Share on other sites More sharing options...
ironstone Posted January 30, 2009 Author Share Posted January 30, 2009 Hi Thanks I tried that but it made no difference. Wish someone could just say it's this or that or even the PHP is fine and point me in the direction of what may be wrong with the Hosting or Host Mail Server etc. Thanks anyway for trying :-) Link to comment https://forums.phpfreaks.com/topic/143103-form-to-e-mail-using-php/#findComment-750647 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.