Email spam using the email library in the encoder

I use the CI library for email.

$this->load->library('email'); 

And my mail function.

 $this->email->clear(); $this->email->set_mailtype("html"); $this->email->to($user_info[0]['email'] ); $this->email->from(' admin@workerbee.com '); $this->email->subject($data['news_letter_info'][0]['subject']); $this->email->message($data['news_letter_info'][0]['template_body']); $this->email->send(); 

All values โ€‹โ€‹arrive correctly, and mail also delivers. But he got into the spam folder in gmail. Can anyone understand why this mail is considered spam. What is the cause of spam mail.

+6
source share
1 answer

There are so many reasons that could explain why email gets into the spam folder of your favorite email client (network-based or not):

  • your server is in the ip blacklist
  • your emails contain keywords that trigger the spam filter.
  • you send spam
  • your mail server is not configured correctly and sends emails similar to spam
  • you send emails containing only images
  • your server does not use DKIM and SPF for email authentication ( see this question from the SE webmaster )
  • Many other reasons that I donโ€™t remember -)

Jeff Atwood also wrote a good article on his blog about good methods of sending email through code.

As for some places to check if your email looks like spam, here are two that I found:

+3
source

Source: https://habr.com/ru/post/947483/


All Articles