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
recieveing mails in spam
Moderator: General Moderators
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: recieveing mails in spam
Do you mean that you are receiving spam? Or that the e-mails sent when your form is submitted are being treated as spam by your e-mail programme, and are therefore not appearing in your inbox?
Re: recieveing mails in spam
yes after submitting the form the email is not appearing in indox instead its appearing in spam
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: [email]mail@gmail.com' . "\r\n";
$headers .= 'Bcc: cc@gmail.com' . "\r\n";
mail($to, $subject, $message, $headers);
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: [email]mail@gmail.com' . "\r\n";
$headers .= 'Bcc: cc@gmail.com' . "\r\n";
mail($to, $subject, $message, $headers);
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: recieveing mails in spam
I do not think that there is anything you can do in PHP which will ensure that gmail always puts these emails in your inbox and not in spam. I had a similar problem about emails sent to me from my website. The answer was to create a filter in gmail (in your gmail page, settings->filters->create a new filter) to tell gmail not to treat emails from my server's address as spam.
Re: recieveing mails in spam
Add your "from" email to your address book in gmail then it will not treat it as spam.
Also, have a look at
it should be
Also, have a look at
Code: Select all
$headers .= 'From: About Wholesale Account' . "<$_POST>\r\n";Code: Select all
$headers .= 'From: About Wholesale Account' . <$_POST['from']>."\r\n";