zoran Posted May 10, 2010 Share Posted May 10, 2010 I have created an application to help me reach potential employers. I send them e-mails and all the details are stored automatically in database. But the e-mails always end up in junk mail folder in my outlook. I am sending them from a web server. I am sending replies to employees looking for web designers, so it is not spam. I think that problem lies in e-mail headers. I am probably missing something. This is the part of the code that creates headers and sends mail: $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: my name <[email protected]>' . "\r\n"; $headers .= 'Cc: recipient list not shown:' . "\r\n"; $headers .= 'Bcc: [email protected]' . "\r\n"; $headers .= 'Message-ID: <[email protected]>'; $start_Html = '<html><head></head><body>'; $end_Html = '</body></html>'; $emailBody = $start_Html .$emailBody.$CV.$end_Html; mail ($value, $mailTitle, $emailBody, $headers); I am sending the mails form a free web hosting server, because I do not want google indexing this application pages as part of my website. Link to comment https://forums.phpfreaks.com/topic/201290-my-e-mails-are-being-sent-to-junk-mail/ Share on other sites More sharing options...
andrewgauger Posted May 10, 2010 Share Posted May 10, 2010 Your $headers .= 'From: my name <[email protected]>' . "\r\n"; should be a valid email address from your domain name $headers .= 'Reply-To: my name <[email protected]>' . "\r\n"; is valid Also, you will need an spf record, which shows up as a TXT entry -- DNS stuff. http://www.openspf.org/Introduction I've tried every free hosting option I could think of trying to get this to work so PLEASE let me know if you can figure it out. Thank you. Link to comment https://forums.phpfreaks.com/topic/201290-my-e-mails-are-being-sent-to-junk-mail/#findComment-1056158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.