你好,我正在使用CodeIgniter与PHP技术,我从应用程序发送电子邮件,但电子邮件被发送到收件人的垃圾邮件文件夹。
$this->load->library('email');
$config['protocol'] = 'sendmail';
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from('aaaa@domain.com', 'MYRegistration');
$this->email->to('abc@domain.com');
$this->email->subject('Congratulation ! You are a User.');
$this->email->message('html code');
$KsbMailStatus = $this->email->send();
这封电子邮件包含一些图片和链接,也因为这是一个注册电子邮件。
2条答案
按热度按时间ruarlubt1#
由于这一行,电子邮件被过滤为垃圾邮件
把它换成别的东西
uidvcgyl2#
发件人电子邮件地址“aaaa@domain.com”应存在。
将其更改为存在的有效电子邮件地址。
可能会解决您的问题