Microsoft office.com/setup program is the ideal package for computing tasks, use by multinational companies and personal users all over the globe. There are issues related to security settings that create email delivery problems in the office 365 edition. You can read about the steps given here for fixing the error 5.7.1.
When you have completed these steps, you can check if the issue of email delivery has been successfully resolved in the www.office.com/setup 365 edition.
Source - https://www.offiice-officecom.com/blog/methods-for-fixing-the-error-code-5-7-1-for-email-delivery-issues-in-office-365-edition/