I want to send messages to Hostgator through office365. I was able to do this using gmail, but I canβt configure it to work with office365.
It works on my two other servers, which I have are just wonderful. The only problem is Hostgator. Do they need to take any action?
<?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 = "************"; $mail->Send(); ?>
I just keep answering like this:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
I was in a support chat with them, and port 587 should be open.
Robert Kuzma
source share