邮件正在进入用户的垃圾邮件文件夹,为什么会这样,请在下面的代码片段中建议我的更改

时间:2017-07-20 11:19:53

标签: php codeigniter codeigniter-2 codeigniter-3

我的项目是在codeigniter中,我发送的邮件中包含以下代码片段,其工作正常,只是问题是邮件进入用户的垃圾邮件文件夹,为什么会发生这种情况,请在下面的代码中建议我更改片段。

我的代码片段:

$subject = 'Test Subject';
$config['protocol'] = 'smtp';
$config['smtp_host'] = "localhost";
$config['smtp_port'] = "25";
$config['charset']  = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['bcc_batch_mode'] = TRUE;
$config['crlf'] = '\r\n';
$config['newline']  = '\r\n';
$this->email->initialize($config);
$this -> load -> library('email');

$msg = "Test Message";

$this -> email -> from('admin@domain.com','Domain Name');
$this -> email -> to('user@gmail.com');
$this -> email -> subject($subject);
$this -> email -> message($msg);
$this -> email -> send();

什么是阻止邮件来自垃圾邮件文件夹的设置?

0 个答案:

没有答案