I have used the mail() function hundreds of times, and I have used the same code as I did the first time I ever used the code, but this problem has stumped me. The code I am using is:
Code: Select all
$content = "some text here";
$headers = "From: email here\r\n";
$to = "$email";
$re = "subject here";
$msg = "$content";
mail($to,$re,$msg,$headers);
$content simply contains the message that I want to display. It all works fine until I send the mail and I then recieve it. What I recieve is the email, but halfway through, all the spaces seem to dissapere, so I am left with one long word. I have copied the code into notepad (and turned off wordwrap) and there are no line breaks, or any weird characters that arent supposed to be there; I even copied it from notepad into the script, but I have not succeeded.
$content holds around 1,000 characters, and below is the writing which it messes up with, anyone got any ideas why this might be happening?
and will begin the construction of your site to the specification's you ordered.\n\nYou will be kept up to date at every stage of your site through an email, and also your through your account
Thanks