I am using CI library for email.
$this->load->library('email');
And my mail function is.
$this->email->clear();
$this->email->set_mailtype("html");
$this->email->to($user_info[0]['email'] );
$this->email->from('[email protected]');
$this->email->subject($data['news_letter_info'][0]['subject']);
$this->email->message($data['news_letter_info'][0]['template_body']);
$this->email->send();
All values are coming correctly and mail is also delivering. But it is ended up in spam folder in gmail. Can anyone have any idea why this mail is counted as spam. What are the reason for a mail to be spam.
There are many reasons for mail to go in spam, but easy solution for it is to set the headers of the mail before sending and giving it priority. Here's how to do that in CodeIgniter. The function is set_header() : $this->email->set_header($header, $value);
Top webmail providers have stated that they look at how many emails are opened and how many are deleted as a factor in spam filtering decisions. So if you have low open rates or read rates, your emails are at higher risk of being flagged as spam. You need to do everything you can to increase engagement.
You can find your Gmail Spam folder in the left sidebar on desktop, or via the three lines menu on mobile. From the Spam folder, you can either delete individual messages or delete them in bulk, if desired. To stop messages from going to Spam you can either report it as not being spam or create a filter.
There are really many reason that might explain why an email ends up in the spam folder of your favorite mail client (web based or not) :
Jeff Atwood also wrote a nice article on his blog about good practices for send email through code.
As for some places to check if your email looks like a spam here are two I've found :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With