0
私はPHPMailerを使用していますが、他人を試しましたが、これはうまくいきません。私はサーバーが私のアクセスを拒否し続けているというエラーが続いていますか?ここで使用したサンプルコードは次のとおりです。Godaddy - Office365 SMTPが機能しません。
<?php
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
//$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.office365.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email protected]'; // SMTP username
$mail->Password = 'xxx'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('[email protected]', 'Mailer');
$mail->addAddress('[email protected]', 'Joe User'); // Add a recipient
$mail->addReplyTo('[email protected]', 'Information');
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
私は彼らの公式ドキュメントに示すように、同じ設定を使用しています:https://support.office.com/en-gb/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7fc677eb-2491-4cbc-8153-8e7113525f6c
問題のようですか?私はいくつかの投稿でオンラインでチェックしたが、何も動作していないようだ。何か案は??経済ホスティングSMTP上
フルエラー – Blag
[Office365の複製はGoDaddyで動作しません](http://stackoverflow.com/questions/41089257/office365-via-godaddy-smtp-does-not-work) – Synchro