2
我已經使用了這幾種方法,但似乎無法得到它的工作。我在實時服務器上運行它。說電子郵件發送,但沒有收到時使用Codeigniter發送電子郵件
我使用bigrock主機,並根據他們的文件說,只是使用「本地主機」作爲smtp主機。 Link
它說,電子郵件發送,但我什麼也沒得到。在提前
public function index() {
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'localhost',
'smtp_port' => '587',
// Other way it say Email sent
//'smtp_host' => 'ssl://localhost',
//'smtp_port' => '465',
'smtp_user' => '[email protected]',
'smtp_pass' => 'sdfsfsdfsd'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'ABC');
$this->email->to('[email protected]');
$this->email->subject('Test');
$this->email->message('Success');
if ($this->email->send()) {
echo 'Email Sent';
} else {
show_error($this->email->print_debugger());
}
}
感謝。
非常感謝..愚蠢的我.. –
沒問題:)它工作? –
是的,它沒有..謝謝, –