發送郵件我用下面的代碼在笨不能在笨
$this->load->library('email');
$this->email->set_mailtype('html');
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
在這裏,我遇到了錯誤的
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
但是,如果郵件類型是發送郵件改爲文字,即
$this->email->set_mailtype('text');
它工作正常。爲什麼這樣呢?
這似乎是您的電子郵件客戶端而不是Codeigniter的問題。你在用什麼客戶?你的籌碼是多少? – elclanrs 2013-05-07 09:31:32
你配置了電子郵件庫嗎? – Simon 2013-05-07 09:32:05
看到這個。可能是同樣的問題。 http://stackoverflow.com/questions/3859958/codeigniter-unable-to-send-email-using-php-mail – 2013-05-07 09:33:08