SMTP Error message using Office 365 account

When I use the Office365 account credentials I receive a SMTP sending error message.
smtp.office365.com
port 587
O365 login account
O365 password

Please let me know what is going wrong because using my private email provider all is working fine.

kind regards,
Jan

make sure your username matches exactly as set in your O365 account.