问题
Possible Duplicate:
How do you make sure email you send programmatically is not automatically marked as spam?
I am sending using codeigniter email library. i am 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();
Email is sending perfectly but its going to spam. I want to inbox
回答1:
That example is triggering gmail's spam filter. Provide some actual content with wording that looks important. Or at least not like spam.
$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);
来源:https://stackoverflow.com/questions/12714969/codeigniter-mail-to-going-to-spam-any-solution