php - phpmailer smtp on outlook server : 554 5.2.0 STOREDRV.Submission.Exception

one text

Solution:

As always, the first thing to do is read the error message. Here it says "send as denied", so I would guess that this means your from address is different to your account address (i.e. $mail->Username is different to $mail->From), and that your mail server does not allow sending from arbitrary addresses.

Your version of PHPMailer is also outdated, which never helps.

Source