SMTP Error Password command failed

Hi,

I'm trying to set up a PHP-Script which is working with PHP-Mailer to send Mails from an internal server to our customer.

  require_once('/scripts/PHPMailer-master/PHPMailerAutoload.php');

  $mail = new PHPMailer();
  $mail->CharSet = 'UTF-8';
  $mail->isSMTP();
  $mail->SMTPDebug = 2;
  $mail->Host = "smtp.office365.com";
  $mail->Port = 587;
  $mail->SMTPSecure = 'tls';
  $mail->SMTPAuth = true;
  $mail->Username = *** Email address is removed for privacy ***;
  $mail->Password = "password";

I already set up a connector on the Office 365 Exchange. The extension=php_openssl.dll in php.ini is set up as well. Credentials were checked multiple times and if I enter a wrong Password there is the same error message.

I hope someone knows a possible solution for this Problem.

Thank you.

That SMTP address is for Office 365 Business, try smtp-mail.outlook.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you for your answer.

I've already tried to use smtp-mail.outlook.com but it didn't work.

We also have Office 365 Business licences on the specified account.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

In Office 365 Exchange Admin Center have you setup a Connector for your SMTP server?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Yes the connector is setup and the MX Entrys are setup as well.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Then you should check with the authors of PHP-Mailer for suggestions why their script isn't working.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated November 14, 2023 Views 162 Applies to: