Office365経由でHostgatorでメールを送信できるようにしたいです。Gmail ではできましたが、office365 で動作するように設定できません。
他の2つのサーバーで動作します。唯一の問題は Hostgator です。
何かを修正する必要がありますか、それとも Hostgator が何らかのアクションを実行する必要がありますか?
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "pod51014.outlook.com";
$mail->Port = 587;
$mail->Username = "usernamehere";
$mail->Password = "************";
/* ... addaddres, reply, subject, message -> the usual stuff you need ... */
$mail->Send();
?>
私はちょうど次の応答を得続けます:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
私は彼らとサポート チャットをしていましたが、587 ポートが開いているはずです。