try your configuration using openssl tool first
- Encode your office365 user
echo -n "your email here " | openssl enc -base64
xxx_encoded_email_xxx
2.Encode your password
echo -n "your password here" | openssl enc -base64
xxx_encoded_password_xxx
3.Open a connection
openssl s_client -connect SMTP.office365.com:587 -starttls smtp -quiet -crlf
4.Test authentification
- wait for the message
250 SMTPUTF8
- send
EHLO SMTP.office365.com
- wait for response
250-PR3P189CA0029.outlook.office365.com Hello [88.138.0.68] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH LOGIN XOAUTH2 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8
- send
AUTH LOGIN
- wait for
334 VXNlcm5hbWU6
- send your encoded user login
xxx_encoded_email_xxx
- wait for
334 UGFzc3dvcmQ6
- send your encoded password
xxx_encoded_password_xxx
- wait for response
235 2.7.0 Authentication successful