Jump to content

Email submission sends /r/n


EchoFool

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.