SMTP Error: Could not Authenticate

hi.
I have an smtp server. i did enabled debugging to get more info on why i cannot send emails from the phplist application.
Just as a side note, i was able to send email using msmtp from the server just to see if the issue is about whitelisting of the ip of the server.
Here is the debug output.

Connection: opening to --cirt-org-bw.mail.protection.outlook.com:25, timeout=5, options=array ()
Connection: opened
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “220 --DB8EUR05FT032.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Tue, 25 Aug 2020 12:42:36 +0000”
SERVER -> CLIENT: 220 --DB8EUR05FT032.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Tue, 25 Aug 2020 12:42:36 +0000
CLIENT -> SERVER: EHLO 10.2.0.9
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]”
SMTP -> get_lines(): $str is “250-SIZE 157286400”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400”
SMTP -> get_lines(): $str is “250-PIPELINING”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING”
SMTP -> get_lines(): $str is “250-DSN”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN”
SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $str is “250-STARTTLS”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS”
SMTP -> get_lines(): $str is “250-8BITMIME”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME”
SMTP -> get_lines(): $str is “250-BINARYMIME”
SMTP -> get_lines(): $data is “250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME”
SMTP -> get_lines(): $str is “250-CHUNKING”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING”
SMTP -> get_lines(): $str is “250 SMTPUTF8”
SERVER -> CLIENT: --250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “220 2.0.0 SMTP server ready”
SERVER -> CLIENT: 220 2.0.0 SMTP server ready
CLIENT -> SERVER: EHLO 10.2.0.9
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]”
SMTP -> get_lines(): $str is “250-SIZE 157286400”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400”
SMTP -> get_lines(): $str is “250-PIPELINING”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING”
SMTP -> get_lines(): $str is “250-DSN”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN”
SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $str is “250-8BITMIME”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8BITMIME”
SMTP -> get_lines(): $str is “250-BINARYMIME”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8BITMIME250-BINARYMIME”
SMTP -> get_lines(): $str is “250-CHUNKING”
SMTP -> get_lines(): $data is “–250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8BITMIME250-BINARYMIME250-CHUNKING”
SMTP -> get_lines(): $str is “250 SMTPUTF8”
SERVER -> CLIENT: --250-DB8EUR05FT032.mail.protection.outlook.com Hello [168.167.53.18]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “221 2.0.0 Service closing transmission channel”
SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
Connection: closed
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

I have disabled certain links since am not allowed to post more than 2 links.
As you can see, i can connect to the smtp server but i cannot authenticate. all passwords are okay as i have tested them elsewhere.

Your assistance will be highly appreciated.
Thank you

@allanbett You appear to be trying to connect on port 25 which is often not correct. Check the documentation for outlook.com for the port number and security then set PHPMAILERPORT and PHPMAILER_SECURE in config.php.

hi @duncanc i am able to test the connection as you can see from the top of the debug info

if i use a different setting, it won’t connect to that port.