0

可能重复:
如何确保以编程方式发送的电子邮件不会被自动标记为垃圾邮件?

我正在使用 codeigniter 电子邮件库发送。我正在使用 SMTP 协议。

    $this->load->library('email');
    $config = array(
        'mailtype' => 'html',
        'protocol' => 'smtp',
        'smtp_user' => 'xxxx@gmail.com',
        'smtp_pass' => 'xxxx',
        'smtp_port' => '465',
        'smtp_host' => 'ssl://smtp.gmail.com',
        'mail_path' => 'ssl://smtp.gmail.com'
        );
    $this->email->initialize($config);
    $this->email->set_newline("\r\n");
        $this->email->from("xxxx@gmail.com","xxxx");        
        $message = "Dear Admin,<br /><br />";
    $this->email->subject('Notification');
    $this->email->message($message);
    $this->email->send();

电子邮件发送完美,但它会成为垃圾邮件。我要收件箱

4

1 回答 1

0

该示例触发了 gmail 的垃圾邮件过滤器。提供一些带有看起来很重要的措辞的实际内容。或者至少不喜欢垃圾邮件。

$message = "Dear firstname lastname,<br /><br />As you have chosen on the setup page, you are receiving this message to indicate that the requested threshold has been reached.";
$this->email->subject('Notification for recurring bill payment');
$this->email->message($message);
于 2012-10-03T19:00:47.330 回答