codeigniter Mail to going to Spam any solution [duplicate]

强颜欢笑 提交于 2019-12-13 08:26:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!