MSUK1 Posted December 29, 2010 Share Posted December 29, 2010 i think because of my code used to send the mail, on my site, its appearing in the spam folder of most of my clients PLUS myself is their a way to eradicate this? correct headers? etc? Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/ Share on other sites More sharing options...
the182guy Posted December 29, 2010 Share Posted December 29, 2010 What headers are you using? Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152767 Share on other sites More sharing options...
MSUK1 Posted December 29, 2010 Author Share Posted December 29, 2010 // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: MSUKGroup <[email protected]>' . "\r\n"; // Mail it if(mail($msuk, $Subject2, $usermail, $headers)){ print "<meta http-equiv=\"refresh\" content=\"0;URL=../Contact/?sent=successful\">"; } else { print "<meta http-equiv=\"refresh\" content=\"0;URL=../Contact/?sent=error\">"; } i know im using an out-dated refresh method just focus on the headers for now hehe x Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152768 Share on other sites More sharing options...
PHPTOM Posted December 29, 2010 Share Posted December 29, 2010 This might not be down to you personally, but the server been blacklisted. Are you on free shared hosting by any chance? Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152778 Share on other sites More sharing options...
MSUK1 Posted December 29, 2010 Author Share Posted December 29, 2010 yes shared, but i had the hosting provider change the outgoing mail IP still think thats the issue? if so i wil purchase a Dedi IP Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152781 Share on other sites More sharing options...
PHPTOM Posted December 29, 2010 Share Posted December 29, 2010 It will most probably be the server's host name that has been blocked and not the IP Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152782 Share on other sites More sharing options...
the182guy Posted December 29, 2010 Share Posted December 29, 2010 Use the reply-to header, make sure your from address is a real mailbox that can receive - some spam filters check this. The correct format is the name in quotes like // Additional headers $headers .= 'From: "MSUKGroup" <[email protected]>' . "\r\n"; I would try playing around with the from name aswell, try to seperate it into MSUK Group, see if it changes anything. If possible, use the above format for the recipient email address aswell, including the recipients first and last name if you have it. Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152785 Share on other sites More sharing options...
MSUK1 Posted December 30, 2010 Author Share Posted December 30, 2010 so in php // Additional headers $headers .= 'From: \"MSUKGroup\" <[email protected]>' . "\r\n"; Quote Link to comment https://forums.phpfreaks.com/topic/222949-php-mail-always-appearing-in-spam-gmail-hotmail-more/#findComment-1152803 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.