I'm trying to send an email by PHP code:
$mailto = 'to@outlook.com';
$mailSub = 'test';
$mailMsg = 'test';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer-master/src/Exception.php';
require 'PHPMailer-master/src/PHPMailer.php';
require 'PHPMailer-master/src/SMTP.php';
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSet = 'UTF-8';
$mail->Host = "smtp.live.com";
$mail->SMTPAuth= true;
$mail->Port = 587;
$mail->Username= "sender@outlook.com";
$mail->Password= "senderpassword";
$mail->SMTPSecure = 'tls';
$mail->From = "sender@outlook.com";
$mail->FromName= "test";
$mail->isHTML(true);
$mail->Subject = $mailSub ;
$mail->Body = $mailMsg;
$mail->addAddress($mailto);
if(!$mail->Send())
{
echo "Mail Not Sent". $mail->ErrorInfo;
}
else
{
echo "Mail Sent";
}
I Get this error :
Mail Not Sent SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: STOREDRV.Submission.Exception:OutboundSpamException; Failed to process message due to a permanent exception with message WASCL UserAction verdict is not None. Actual verdict is HipNotify, ShowTierUpgrade. OutboundSpamException: WASCL UserAction verdict is not None. Actual verdict is HipNotify, ShowTierUpgrade. [Hostname=AM0PR0402MB3714.eurprd04.prod.outlook.com] SMTP code: 554 Additional SMTP info: 5.2.0