I am having one string which is of near about 100 lines which is similar to this
My name is John. \r\n I am a boy. \r\n I am so in so
Here the above string is coming from backed so when I send mail using PHP mail function it should output as below.
My name is John.
I am a boy.
I am so in so
But unfortunately it give this output to me.
My name is John. I am a boy. I am so in so
The method I am using is similar to this.
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type:text/html;charset=UTF-8\r\n";
$msg = "Above Str";
mail(to@user, Subject, $msg, $header);
Can anyone help to do make this proper so.
`, or change the content-type to `text/plain` to make the client output it as plain text. – M. Eriksson Jan 31 '23 at 11:05