jsshanthi Posted September 13, 2010 Share Posted September 13, 2010 Hi, I Have a form after successful submission a mail must be send to particular recipient and thank you mail is send to the person who filled the form ,The problem is i am receiving mails in spam whats the reason for going in spam I have kept Capture code also Can please let me know what to do Quote Link to comment Share on other sites More sharing options...
chintansshah Posted September 13, 2010 Share Posted September 13, 2010 Hi jsshanthi, Can you please set the header in mail function and then check. But, please set "From" in mail function. Quote Link to comment Share on other sites More sharing options...
jsshanthi Posted September 13, 2010 Author Share Posted September 13, 2010 Her is the code: I have been included headers $host = "ssl://smtp.gmail.com"; $port = "465"; $to = " xx@gmail.com"; // note the comma $subject = " $_POST[company_website] "; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: About Wholesale Account' . "<$_POST>\r\n";$headers .= 'Cc: mail@gmail.com' . "\r\n"; $headers .= 'Bcc: cc@gmail.com' . "\r\n"; mail($to, $subject, $message, $headers); Quote Link to comment 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.