【问题标题】:codeigniter email sent to spam发送到垃圾邮件的 codeigniter 电子邮件
【发布时间】:2012-05-27 18:40:26
【问题描述】:

我的模特:

<?php
class email_model extends CI_Model {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

        public function sendEmail($from = null, $to = null, $subject = null, $message = null){

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

            $config['protocol'] = 'sendmail';
            $config['mailpath'] = '/usr/sbin/sendmail';
            $config['charset'] = 'utf-8';
            $config['mailtype'] = 'html';
            $config['wordwrap'] = TRUE;

            $this->email->initialize($config);

            $this->email->from('email@mydomain.com', 'Website name');

            $this->email->to($to);

            $this->email->subject($subject);

            $this->email->message($message);

            $this->email->send();

        }
}

我的域托管在 GoDaddy 上,我还在那里创建了一封电子邮件并将其重定向到我的 gmail 电子邮件...

为什么我的电子邮件被发送到垃圾邮件文件夹而不是收件箱?

编辑:我的电子邮件内容基本上是欢迎邀请

Hello $email

$website has invited you to join the website

to join visit the following link

$link_goes_here

Thanks, the team

【问题讨论】:

  • 取决于您发送的内容,与您用于发送的代码无关。 Gmail 的垃圾邮件过滤器非常好,如果它认为您的电子邮件是垃圾邮件,我很好奇它的内容是什么。
  • 考虑看看this solution
  • 同意以上2个cmets,你也不妨看看你之前的问题,在合适的地方选择答案
  • @jeshurun 我已经用电子邮件的内容更新了我的问题
  • 可能有很多东西...主题、内容、发件人,甚至是您发送邮件的 IP 地址。 a) 主题、内容和发件人:尝试通过americaint.com/spam-filter-messagetest/spam-checker.html 等工具输入您的电子邮件等内容 b) 转到mxtoolbox.com/blacklists.aspx 并输入您服务器的IP 地址。

标签: php email codeigniter spam


【解决方案1】:

如果您使用 HTML 来显示您的邮件,您必须确保您的邮件使用有效的 html 发送。 您可以在此处验证您的邮件:http://validator.w3.org/

【讨论】:

    【解决方案2】:

    如果是,请联系我们表格.. 也许您可以尝试通过 Amazon SES 发送电子邮件,因此 google/yahoo 不会认为它是垃圾邮件

    【讨论】:

      猜你喜欢
      • 2013-10-17
      • 1970-01-01
      • 2013-08-02
      • 1970-01-01
      • 1970-01-01
      • 2017-03-02
      • 1970-01-01
      • 1970-01-01
      • 2018-03-16
      相关资源
      最近更新 更多