PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have bin getting "\r\n" symbols in my mails instead of a text going in a new line.
Iwwas told that I dont have a correct MIME TYPE but I do not know how to fix this prblem.
The script I'm using is:
I put the function str_replace on text but it didn't work.
<?php
$message = str_replace(array("\r\n", "\r"), "\n", $message);
?>
I was told that the problem is with the MIME type.
That I shuld change somethin there but I just don't know what.
Try doing a var_dump() on $message before mailing it and see what is in there. There is a chance that the mysql_prep function might be doing something to it. wordwrap(), be default, will also add a "\n" new line char at the end of the line by defualt.
Everah | Please use the correct [code] bbcode tag when posting code in the forums.
var_dump() didn' help. It outputs the content back on the page and the message was not sent.
My mysql_prep function look licke this:
Fredy wrote:var_dump() didn' help. It outputs the content back on the page and the message was not sent.
Everah wrote:Try doing a var_dump() on $message before mailing it and see what is in there. There is a chance that the mysql_prep function might be doing something to it.
That was the point, not to send the message but to see the message as PHP sees it.
Fredy wrote:My mysql_prep function look licke this:
Dispage I was FTPing to the server to test.
I remuved the function mysql_prep and replace it with htmlenities.
Now it works fine and I hope htmlentities replacement.
Thanks for yor help Everah