EchoFool Posted October 1, 2010 Share Posted October 1, 2010 Hey, I have a submission form to ask for support to my support email. But when i recieve messages the break lines are not counted for and i get the r/n. I then added the nl2br($Message) but that also does not work.... and so im not sure how i solve it ... here is my script: <?php If(isset($_POST['Send'])){ $supportemail ='support@mydomain.com'; $Username = $_POST['Username']; $Email = $_POST['Email']; If(strlen($Email)<3){ ?> Invalid email address! <br /> <a href="index.php">Continue</a> <br /><br /> <?php }Else{ $subject = 'I am requesting help!'; $headers = 'From: '.$Email.' <'.$Email.'>'."\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n"; $headers .= 'mailed-by: text/html; charset=iso-8859-1'."\r\n"; $message = "<b>".ucwords($Username)."</b> has requested help ! <br /><br />"; $message .= "Their message is: <br /><b>".nl2br($_POST['letter'])."</b> <br /><br />"; $message .= "Email is: <b>".$Email."</b>"; mail('$supportemail', $subject, $message, $headers); ?> Your message has succesfully been sent, you will be contacted by the email "<? echo $Email; ?>" that you have provided as soon as possible! <a href="index.php">Continue</a> <br /><br /> <?php } ?> Hope you can help! Quote Link to comment https://forums.phpfreaks.com/topic/214945-email-submission-sends-rn/ Share on other sites More sharing options...
schilly Posted October 1, 2010 Share Posted October 1, 2010 Looks ok. Can you paste the full headers of the email you receive? You should remove the quotes on $supportemail: mail('$supportemail', $subject, $message, $headers); Quote Link to comment https://forums.phpfreaks.com/topic/214945-email-submission-sends-rn/#findComment-1118135 Share on other sites More sharing options...
EchoFool Posted October 1, 2010 Author Share Posted October 1, 2010 See image to see what i see when i receive the email... theres no other information that i can see regarding the headers.. http://i52.tinypic.com/167qx04.png Quote Link to comment https://forums.phpfreaks.com/topic/214945-email-submission-sends-rn/#findComment-1118136 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.