0

I found an issue with spacing in mail() function. This is my code:

$headers = 'Content-Type: text/html; charset=utf-8' . "\r\n";
$mailmsg = "Odpověď na nábor:" .$name.".\n\n\n\nDiscord:".$discord.".\n\nVěk:".$vek . '?=';

The \n does nothing and the mail looks like this

Odpověď na nábor:Kolomboootest.Discord:Kolombooo#3257. Věk:15

ADyson
  • 57,178
  • 14
  • 51
  • 63
Kolombooo
  • 67
  • 4

1 Answers1

1

That's because \n is meaningless in HTML and you've set the email's content type to HTML.

In HTML you can use <br/> to make new lines.

ADyson
  • 57,178
  • 14
  • 51
  • 63