My Mails Is Always Going To Spam Folder Even Deliv

2019-09-21 21:08发布

问题:

I'm Trying To Send Mails From My Web Server Using SMTP PROTOCOL in codeigniter frame work.my mails was always delivering late and going to spam.i had follow many past conservations,still i didn't solve this problem.help me folks to solve this problem.here is my code:

$config = Array('protocol' => 'smtp',
                       'smtp_host' => 'http://smtp.tfas.net/',
                       'smtp_port' => 465,
                       'smtp_user' => 'info@tfas.net',
                       'smtp_pass' => 'xxxxxxx',
                       'mailtype'  => 'html', 
                       'mailpath' => '/usr/sbin/sendmail',
                       'charset'   => 'utf-8'
                        );
      $this->load->library('email', $config);
      $this->email->set_newline("\r\n");
      if (file_exists($attachment_path)) 
      {
        $this->email->attach("$attachment_path");
        $this->email->from('info@tfas.net','TFAS MEMBER PORTAL');
        $this->email->reply_to('info@tfas.net','Help Center');
        $this->email->message($message);
        $this->email->to($to);
        $this->email->subject('Greetings From TFAS Member Portal');
      }
      else
      {
        $this->email->from('info@tfas.net','TFAS MEMBER PORTAL');
        $this->email->reply_to('info@tfas.net','Help Center');
        $this->email->message($message);
        $this->email->to($to);
        $this->email->subject('Greetings From TFAS Member Portal');
      }
        if($this->email->send())
        {
        return true;
        }
        else
        {
        return false;
        }

// Even I had gone through this link https://github.com/ivantcholakov/codeigniter-phpmailer which is a tutorial to send mails with phpmailer library in codeigniter but same problem araises..

回答1:

I don't think this is an issue with codeigniter's mailer. Usually, emails are marked as spam by email service providers based on the content or an IP filter. In your case it's possible that your content appear spam-like due to not having relevant text and images. Google and most providers has a list of spam words that they look out for when evaluating the spam-ness of your emails. Check this out as it may be help you to find a useful lead: http://blog.hubspot.com/blog/tabid/6307/bid/30684/The-Ultimate-List-of-Email-SPAM-Trigger-Words.aspx