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); ?> 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. 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
Archived
This topic is now archived and is closed to further replies.