JJohnsenDK Posted October 10, 2007 Share Posted October 10, 2007 Hey I want to sent HTML with the mail function, shouldnt this be the way to do that? <?php $headers .= "FROM: ".$settings['sitename'].""; $headers .= "Content-type: text/html"; mail($email, $sub, $msg, $headers); ?> Quote Link to comment https://forums.phpfreaks.com/topic/72612-solved-mail-function-what-am-i-doing-wrong-with-the-header/ Share on other sites More sharing options...
Orio Posted October 10, 2007 Share Posted October 10, 2007 You need to add a newline after each header. Try it this way: <?php $headers .= "FROM: ".$settings['sitename']."\n"; $headers .= "Content-type: text/html"; mail($email, $sub, $msg, $headers); ?> Orio. Quote Link to comment https://forums.phpfreaks.com/topic/72612-solved-mail-function-what-am-i-doing-wrong-with-the-header/#findComment-366115 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.