Text from flash to php to email

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:


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

here’s my PHP:


$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.