この質問が既に投稿されていることは知っていますが、私の問題に対する答えが見つかりませんでした。gmailサーバーでcodeigniterを使用してメールを送信しています。このタスクに使用されるコードは次のとおりです。
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['mail_path'] = 'ssl://smtp.googlemail.com';
$config['smtp_user'] = 'my-email@gmail.com';
$config['smtp_pass'] = '******';
$config['smtp_port'] = '465';
$config['smtp_timeout'] = '30';
$config['mailtype'] = 'text';
$config['charset'] = 'utf-8';
$config['validate'] = TRUE;
$config['crlf'] = '\r\n';
$config['newline'] = '\n\n';
$this->load->library('email',$config);
$this->email->from('my-email@gmail.com');
$this->email->to('another-email');
$this->email->subject('Validation');
$message = "some message";
$this->email->message($message);
$this->email->send();
そして、私$this->email->print_debugger()
はエラーを表示するために使用します。私が受け取るメッセージは次のとおりです。
The following SMTP error was encountered: 13 Unable to find the socket transport "ssl" -
did you forget to enable it when you configured PHP?
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:
from:
The following SMTP error was encountered:
Unable to send data: RCPT TO:
to:
The following SMTP error was encountered:
Unable to send data: DATA
data:
The following SMTP error was encountered: ...
もちろん、php.ini ファイルの SSL に対応する行のコメントを外しました...
何かご意見は ?
ありがとう :)