mail($email, $subject, "Welcome to **!\n\n The password for your account is:\n $password", $headers);
I want the $password to be 2 spaces forward, what should i use? doesnt not work in hotmail at least
mail($email, $subject, "Welcome to **!\n\n The password for your account is:\n $password", $headers);
I want the $password to be 2 spaces forward, what should i use? doesnt not work in hotmail at least
Add <html> and </html>: to indicate the message is HTML formatted. Then you can use
Use the nl2br function to convert newlines to <br/>s.
Also set the Content-Type by appending a header "Content-Type: text/html; charset=UTF-8".
If you don't want to use HTML: you can use the tab-character \t too, but not sure if Hotmail supports that eighter.
This really depends on what you are reading it in. The problem with Hotmail is that it sees it as plan text, but converts it to HTML most likely to display to you.
If the e-mail's Content-Type is text/plain, then all spaces should be honored. Sounds like you're transmitting the e-mail message as text/html, which is why you would need the   to get the second space to show up.
You'll can send the email as HTML which requires extra headers and actual HTML in your message body:
// Add extra headers to $headers
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// Send mail as HTML
mail($email, $subject, "<html><body>Welcome to **!<br><br> The password for your account is:<br> $password</body></html>", $headers);
Use the http://swiftmailer.org/ Class to do emailing with PHP. It's nice done and gives you a lot of nice features.