可能重复:
How do you make sure email you send programmatically is not automatically marked as spam?
我发送使用codeigniter电子邮件库。我是usimg SMTP PROTOCOL。
$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();
电子邮件发送完美,但会发送垃圾邮件。我想收件箱
答案 0 :(得分: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);