Testing SMTP with STARTTLS via openssl

You need to make your username and password into base64

echo -ne "noreply@dev0.sh" | base64
echo -ne "password" | base64
openssl s_client -connect smtp.office365.com:587 -crlf -starttls smtp
> stuff
ehlo contoso.com
> 250-BL0PR02CA0144.outlook.office365.com Hello [100.36.37.115]
> 250-SIZE 157286400
> 250-PIPELINING
> 250-DSN
> 250-ENHANCEDSTATUSCODES
> 250-AUTH LOGIN XOAUTH2
> 250-8BITMIME
> 250-BINARYMIME
> 250-CHUNKING
> 250 SMTPUTF8
auth login
> 334 VXNlcm5hbWU6
 [base64 username]
> 334 UGFzc3dvcmQ6
 [base64 password]
> 235 2.7.0 Authentication successful
Note

This will make a sign on event in Azure that you can check as well