Failed to send mail: end of file reached for office365

Knowledge Drop

Last tested: Jan 31, 2020
 

If you're following these steps, and running into a "Failed to send mail: end of file reached" error, you are probably using smtp.office365.com as your Mail Server rather than your specific MX server.

To find the MX server for your domain: type nslookup, then set type=mx, then enter your domain name. For example, if your domain name is lookertest.com:

$ nslookup

> set type=mx

> lookertest.com

Server: 8.8.4.4

Address: 8.8.4.4#53

Non-authoritative answer:

lookertest.com mail exchanger = 0 lookertest-com.mail.protection.outlook.com.

Authoritative answers can be found from:

> exit

From this example the MX server is "lookertest-com.mail.protection.outlook.com".

You can then enter this as the Mail Server, and the error should resolve.

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:12 PM
Updated by: