SMTP ERROR: Failed to connect to server: Connection refused (111) in Godaddy server

I have set PHPMailer code as bellow. This is working fine.

<?php

    $mail = new PHPMailer(TRUE);
    $mail->isSMTP();
    $mail->SMTPDebug = 2;
    $mail->SMTPAuth = TRUE;
    $mail->SMTPAutoTLS = FALSE;
    $mail->SMTPSecure = "tls";
    $mail->Host = "smtpout.secureserver.net";
    $mail->Port = 80;
    $mail->Username = "Username";
    $mail->Password = "Password";

    $mail->setFrom("[email protected], "Name");
    $mail->addAddress("[email protected]", "Name");
    $mail->isHTML(TRUE);
    $mail->Body = "My HTML Code";
    $mail->Subject = "My Subject";
    $mail->send();

?>

Leave a Reply

Your email address will not be published. Required fields are marked *