我使用Xampp,並且我想使用CodeIgniter發送電子郵件。如果使用SMTP出現錯誤:「您的郵件已成功使用以下協議發送:郵件」,但我什麼都沒有收到
Message: fsockopen(): unable to connect to ssl://smtp.googlemail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) Filename: libraries/Email.php
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'your_password'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Your Name');
$this->email->to('(here I put my mail)@yahoo.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
(line extension=php_openssl.dll is decomented)
通過這些設置:
$this->load->library('email');
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Your Name');
$this->email->to('(here I put my mail)@yahoo.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
出現消息:您的郵件已經發送成功使用以下方案:郵件
來源:「你名稱「 返回路徑:.......
但我沒有收到任何郵件。
什麼問題?
聽起來像你需要自己的郵件服務器。附:如果你想降低某些東西,評論並說明原因。直到那時爲止。 – Nick 2013-02-22 18:41:36
@尼克這不是投票應該如何工作。請不要爲了抵消其他人的降價而加註。 – 2013-02-22 18:50:04
@Pekka웃如果有人不會解釋爲什麼他們低估了,他們應該這樣做,那麼我認爲沒有理由毀掉某些人的名聲。他們至少可以被告知如何改進。 upvote並非沒有道理 – Nick 2013-02-22 18:51:29