1

CodeIgniter とoutlook.com (XAMPP を使用) を使用してメールを送信しようとしています。

Codeigniter とGmail$configを使用したメールの送信は、次の仕様を使用してうまく機能しました。

$config = array(
  'mailtype' => 'html'
  'protocol' => 'smtp',
  'smtp_host' => 'ssl://smtp.googlemail.com',
  'smtp_port' => 465,
  'smtp_user' => '******@gmail.com',
  'smtp_pass' => '******'
);

ただし、次のoutlook.com 構成仕様を適用すると、エラー メッセージが表示されます (以下を参照)。

$config = array(
  'mailtype' => 'html'
  'protocol' => 'smtp',
  'smtp_host' => 'ssl://smtp.live.com',
  'smtp_port' => 587,
  'smtp_user' => '******@outlook.com',
  'smtp_pass' => '******'
);

エラー:

A PHP Error was encountered
Severity: Warning
Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:     error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Filename: libraries/Email.php
Line Number: 1689

A PHP Error was encountered
Severity: Warning
Message: fsockopen(): Failed to enable crypto
Filename: libraries/Email.php
Line Number: 1689

A PHP Error was encountered
Severity: Warning
Message: fsockopen(): unable to connect to ssl://smtp.live.com:587 (Unknown error)
Filename: libraries/Email.php
Line Number: 1689

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846

A PHP Error was encountered
Severity: Warning
Message: fgets() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1869

Replacing 'smtp_host' => 'ssl://smtp.live.com' with 'tls://smtp.live.com' results in the following error messages:

A PHP Error was encountered
Severity: Warning
Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Filename: libraries/Email.php
Line Number: 1689

[etc.]

質問: Codeigniter Email を outlook.com で動作させるには、どの仕様を適用する必要がありますか?

4

0 に答える 0