Just a quick note to describe the procedure for SMTP auth testing via the command-line. At first you need to encode username and password in Base64. This can be done in several ways. The easiest way would be via https://www.base64encode.org/.
Next you can use the following commando’s via telnet to test SMTP AUTH. I always use OpenSSL to connect to the mail server. OpenSSL give you the option to connect to the mail server using STARTTLS.
1) Connect to the mail server
openssl s_client -starttls smtp -crlf -connect smtp.office365.com:25
2) Send the EHLO command to see which items the server supports
250-VI1PR0101CA0034.outlook.office365.com Hello [18.104.22.168]
3) Start SMTP AUTH
4) The 334 command tells you to enter the Base64 username. When the correct username is entered, the server responses with “334 UGFzc3dvcmQ6”.
5) Enter the Base64 password. The server responses with a successful or unsuccessful message.
235 2.7.0 Authentication successful target host VI1PR06MB1198.eurprd06.prod.outlook.com
6) Now enter the default command’s to send a mail.
SUBJECT: this is the subject
This is the body of the message