0
sorry for my english,
i have config email in codeigniter
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => '465',
'smtp_user' => '-----',
'smtp_pass' => '-----',
'mailtype' => 'html',
'charset' => 'utf-8'
$this->load->library('email', $this->session->userdata('config'));
$this->email->from('[email protected]', 'Rtlx Team');
$this->email->to($email);
$message = "Dear ";
$this->email->subject('Rtlx Team - Account Verification');
$this->email->message($message);
$this->email->send();
$this->email->clear();
但它顯示以下錯誤: 消息:電子郵件()[function.mail]:無法在「本地主機」連接到郵件服務器的端口465,驗證「SMTP」和「SMTP_PORT」在php.ini中設置或使用的ini_set()發送電子郵件proble
Message: mail() expects parameter 1 to be string, array given
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
我敢肯定,我也有類似的問題,這是因爲電子郵件庫的預期,要發送的smtp用戶名和密碼,爲了解決這個問題,您可能需要擴展電子郵件庫它不檢查連接。它是這樣做的,因爲SMTP連接失敗,因此它回落到「郵件」功能。 – mic