2013年5月17日金曜日

送信失敗:Failed to connect to example.org:587 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]

環境はcentos6.3

「10日でおぼえるlinuxサーバー入門教室」のLESSON33よりメール送信を実施すると以下のエラーが発生。

P275より送信ボタンを押すと以下のエラー

送信失敗:Failed to connect to example.org:587 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]

post.phpの編集を実施。
post.phpより抜粋
-----------------------
mdb2 error connect failed mysql
送信失敗:Failed to connect to example.org:587 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]
//SMTPサーバへ接続するためのアカウント情報
         $params = array(
         "host" => "example",  //SMTPサーバ名
         "port" => 587,  //送信ポート25 or 587が一般的
         "auth" => "PLAIN", //認証の方式、他に暗号化など色々ある
         "username" => "ichinohe", //送信者名
         "password" => "xxxxxxxx" //パスワード
      );
-----------------------
///***exampleをプロバイダのsmtpサーバーに設定***///
///***ininoheをsmtpサーバーにアクセスできるアカウント名に設定***///
///***xxxxxxxxをsmtpサーバーにアクセスできるアカウント名に対するパスワードに設定***///
------>送信に成功
他にファイヤウォールで25と587を開けたが閉じても同様に送信に成功。


0 件のコメント:

コメントを投稿