# Mailer - New lines within textarea problem

**URL:** https://forum.kirupa.com/t/mailer-new-lines-within-textarea-problem/297627
**Category:** programming
**Created:** [October 6, 2009, 5:49am UTC](https://forum.kirupa.com/t/mailer-new-lines-within-textarea-problem/297627 "2009-10-06T05:49:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GGMcGee](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@GGMcGee](https://forum.kirupa.com/u/GGMcGee)
#### Post date: [October 6, 2009, 5:49am UTC](https://forum.kirupa.com/t/mailer-new-lines-within-textarea-problem/297627/1 "2009-10-06T05:49:18Z")

</div>

Got a php contact form set up and I’ve made the email it sends formatted with HTML.

```auto

    $headers .= "MIME-Version: 1.0" . "
";
    $headers .= "Content-type: text/html; charset=utf-8" . "
";
    $headers .= "From: $email" . "
";

```

```auto

    $body .= "<html>";
    $body .= "<body>";
    $body .= //whatever
    $body .= "</body></html>";

```

```auto

    $body = wordwrap($body, 70);
    
    $body = stripslashes($body);

```

It’s all working except for one small problem that seems to be to do with the html formatting of the email…

**When the user types a message into the textarea message box, the email sent doesn’t show where they have hit enter and gone to a new line. So their whole message is displayed in one long line, or paragraph, with no spacing.**

Does anyone know why this is happening? When I don’t format it in html the spaces the user creates by entering down however many lines are displayed fine, but of course I can’t make the font all pretty if I don’t… =\
