9three Posted October 11, 2009 Share Posted October 11, 2009 Hey, I'm using the mail function to send emails but they are all landing in the spam folder. I've tried different emails and they all land in the spam/junk folder. I'm sending HTML as well. I hope thats not causing it to send the email to the spam folder. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: '.$toname.' <'.$toemail.'>,' . "\r\n"; $headers .= 'From: xxxxx.com <[email protected]>' . "\r\n"; if(mail($toemail, $subject, $msg, $headers)) return true; else return false; Those are the headers I use, I'm not sure if there is something extra I need to put in? Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/ Share on other sites More sharing options...
jon23d Posted October 11, 2009 Share Posted October 11, 2009 If it isn't coming from a fully qualified domain name, then this is not surprising. Try using SMTP instead. Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/#findComment-935002 Share on other sites More sharing options...
9three Posted October 11, 2009 Author Share Posted October 11, 2009 It is coming from a qualified domain name. Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/#findComment-935003 Share on other sites More sharing options...
PFMaBiSmAd Posted October 11, 2009 Share Posted October 11, 2009 http://www.phpfreaks.com/forums/index.php/topic,269373.msg1284757.html#msg1284757 Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/#findComment-935072 Share on other sites More sharing options...
grissom Posted October 11, 2009 Share Posted October 11, 2009 Does the return e-mail address [email protected] actually exist ? If not, set it up. Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/#findComment-935100 Share on other sites More sharing options...
9three Posted October 11, 2009 Author Share Posted October 11, 2009 I removed the domain on purpose. I'll try what PFMaBiSmAd posted. Link to comment https://forums.phpfreaks.com/topic/177329-mail-function-sends-to-spam/#findComment-935112 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.