我正在尝试向注册我的网站的注册者发送一个电子邮件地址,但是我的这部分代码没有运行。我试图找出原因。我已遵循所有必要的文档。我将此部分替换为 php 的邮件功能以进行调试,以查看它是否会在我的服务器上发送电子邮件,它会。有人对它可能是什么有任何想法吗?
// User was successfully created and the user needs to verify their account.
// Send registered an email informing them how to validate their account.
$this->load->library('email');
$this->email->from('owner@owner.com', 'Owner Name');
$this->email->to($post_email_address);
$this->email->subject('Site Name Here Registration');
$this->email->message('Thank you for registering for our site. Here is your registration key to activate your account: '.$registration_key.' Please click on the following link to activate your account.<br />'.anchor('project-manager/login/verify/'.$registration_key, 'Click Here To Activate Your Account', ''));
$this->email->send();
这是 application/config 目录中 email.com 的配置。
<?php
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;