【发布时间】:2016-08-10 02:03:17
【问题描述】:
我使用 sendmail 方法向注册用户发送邮件。用户注册时发送电子邮件,但每次发送邮件需要 5 分钟。这是我的代码。
它在 codeigniter 框架中。
public function MailTest()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->load->library('email');
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['wordwrap'] = TRUE;
$this->email->initialize($config);
$this->email->from('preetham@gmail.com', 'preetham');
$this->email->to('preetham@gmail.com');
$this->email->subject(' Success! Your order has been sent.');
$this->email->message('Success! Your order has been sent');
$this->email->send();
//echo $this->email->print_debugger();
//echo "Success";
}
我问了一些朋友,他们建议我不是编程问题,而是服务器问题。我刚刚联系了 godaddy,但我没有得到满意的结果。如果您知道解决方案,请帮助我。
【问题讨论】:
-
托管服务器上没有。
-
检查您的邮件队列。 Document.
-
检查错误日志和邮件服务是否正常
标签: php codeigniter email sendmail