The situation is the following. I stored a plain text email in MySQL containing linebreaks as
. When my php script needs to send the mail it first fills in some parameters with sprintf
and then the mail is sent with the standard mail()
function.
The problem I encounter is that the email client (thunderbird in my case) displays these linebreaks instead of interpreting them.
To test my script I hardcoded a sentence in the mail. When I do this the mail is interpreted correctly. My first tought was that MySQL escapes the backslashes, so I tried to do a str_replace("\\\\", "\\", $str)
but this doesn't help.
I'm obviously making a wrong assumption or stupid error, but I don't see it. What could be the problem?