[英]Email not sent using Codeigniter 2
In my server email is sent if we use simple mail() function but it's not sent by using the following codes of Codeigniter. 在我们的服务器中,如果我们使用简单的mail()函数发送电子邮件,但不会通过使用以下Codeigniter代码发送电子邮件 。
$this->load->library('email');
$this->email->from('your@example.com', 'Your Name');
$this->email->to('someone@example.com');
$this->email->cc('another@another-example.com');
$this->email->bcc('them@their-example.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
What is the issue behind it? 背后的问题是什么? What will be the solution for it?
有什么解决方案? Thnx in advance.
提前thnx。 Cheers
干杯
Result of print_debugger(): print_debugger()的结果:
Unable to send email using PHP mail().
Your server might not be configured to send mail using this method.
From: "My Site" Return-Path:
Reply-To: "info@mysitedomain.com"
X-Sender: info@mysitedomain.com
X-Mailer: CodeIgniter X-Priority: 3 (Normal)
Message-ID: <66751b444845099d@mysitedomain.com>
Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
=?utf-8?Q?test_email_sending.?= Test email message.
you must enable PHP Mail() in your server to do mailing. 您必须在服务器中启用PHP Mail()进行邮件发送。
OR 要么
you can try email using SMTP 您可以尝试使用SMTP发送电子邮件
Ref: http://ellislab.com/codeigniter/user-guide/libraries/email.html 参考: http : //ellislab.com/codeigniter/user-guide/libraries/email.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.