Preciso de enviar e-mail da máquina de ipage usando o PHPMailer

não posso enviar um e-mail através da máquina de ipage usando o PHPMailer.

Tenho o seguinte erro:

* * erro de E-Mail: o seguinte do endereço falhou: [email protected] : Called Mail () without being connected

<?php
//Import PHPMailer classes into the global namespace
require 'PHPMailer/class.phpmailer.php';

function smtpmailer($to, $from, $from_name, $subject, $body, $is_gmail = false) { 
    global $error;
    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->SMTPAuth = true; 

    $mail->SMTPSecure = 'ssl'; 
    $mail->Host = 'mail.mydomain.com';
    $mail->Port = 993;  
    $mail->Username = "[email protected]";  
    $mail->Password = "mypassword";   


    $mail->SetFrom($from, $from_name);
    $mail->Subject = $subject;
    $mail->Body = $body;
    $mail->AddAddress($to);

    if(!$mail->Send()) {
        $error = 'Mail error: '.$mail->ErrorInfo;
        return false;
    } else {
        $error = 'Message sent!';
        return true;
    }
}


$msg = 'Hello World';
$subj = 'test mail message';
$to = '[email protected]';
$from = '[email protected]';
$name = 'maa';


    if (!smtpmailer($to, $from, $name, $subj, $msg, false)) {
        if (!empty($error)) echo $error;
    } else {
        echo 'Yep, the message is send (after doing some hard work)';
    }
?>

o registo de erros moveu-se para aqui:

SMTP -> FROM SERVER:220 ESMTP Wed, 20 Sep 2017 09:57:47 -0400: UCE strictly prohibited SMTP -> FROM SERVER: 250-bosauthsmtp15.yourhostingaccount.com Hello localhost [156.204.159.206] 250-SIZE 34603008 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP SMTP -> FROM SERVER:220 TLS go ahead SMTP -> FROM SERVER: 250-bosauthsmtp15.yourhostingaccount.com Hello localhost [156.204.159.206] 250-SIZE 34603008 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP SMTP -> ERROR: Username not accepted from server: 535 Incorrect authentication data SMTP -> FROM SERVER:250 Reset OK SMTP -> FROM SERVER:550 bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted SMTP -> ERROR: MAIL not accepted from server: 550 bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted The following From address failed: [email protected] : MAIL not accepted from server,550,bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted

SMTP server error: bosauthsmtp15: Host 156.204.159.206: No unauthenticated these is what I get

relaying permitted Mail error: The following From address failed: [email protected] : MAIL not accepted from server,550,bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted

SMTP server error: bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted

SMTP server error: bosauthsmtp15: Host 156.204.159.206: No unauthenticated relaying permitted
Author: Useless, 2017-09-19