It seems a problem on the SMTP server side. Give a check at official Microsoft documentation. For example Fix issues with printers, scanners, and LOB applications that send email using Office 365 -.
Sometimes the problem is our firewall and virus scan software. The SMTP signal gets blocked by the software and / or firewall.
Check this link: