I'm getting this 开发者_如何学Pythonerror with the mail()
function in CodeIgniter:
A PHP Error was encountered
Severity: Warning
Message: mail() [function.mail]: Bad parameters to mail() function, mail not sent.
Filename: libraries/Email.php
Line Number: 1519
Here is my mail script (part of my controller):
$message = "...text...";
$this->load->library('email');
$this->email->from('oemsales@xxx.com', 'OEM Sales');
$this->email->to('xxxx@xxx.com');
$this->email->subject('Contact Page Request');
$this->email->message($message);
$this->email->send();
Line 1519 is the line where the email is sent. What is going on here?
SOLVED: Found the answer here: http://codeignitertips.blogspot.com/. It was a GoDaddy issue.
Check if you have the correct email address in your to
method. Make sure of it.
精彩评论