# Text from flash to php to email

**URL:** https://forum.kirupa.com/t/text-from-flash-to-php-to-email/282357
**Category:** Uncategorized
**Created:** [February 20, 2009, 5:41pm UTC](https://forum.kirupa.com/t/text-from-flash-to-php-to-email/282357 "2009-02-20T17:41:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)
#### Post date: [February 20, 2009, 5:41pm UTC](https://forum.kirupa.com/t/text-from-flash-to-php-to-email/282357/1 "2009-02-20T17:41:34Z")

</div>

Hey all

Hoping for some help with this. I have some input text in flash, which I am sending to php which sends an email with the text as the body. My problem is that I am losing the line spaces in the email. When I trace out the string in flash, the line spaces appear in the output window just fine.

here’s my actionscript:

```auto

var pcLB:RegExp = /
/g;
var macLB:RegExp = /\r/g;
_URLFriendlyMessage = _URLFriendlyMessage.replace(pcLB, "
");
_URLFriendlyMessage = _URLFriendlyMessage.replace(macLB, "
");

```

here’s my PHP:

```auto

$message = nl2br($message);
$mail->setText($message);

```

The email comes out with no linebreaks, just all the text running into itself. Can anyone help?

Thanks!

Emma.
