Error 0x8004010F appears when Outlook cannot locate or connect to the mail server while sending messages through Office 365. This error typically occurs because Outlook has a corrupted or outdated Autodiscover cache, an incorrect mail profile, or a damaged offline data file. This article explains the root cause of error 0x8004010F and provides step-by-step fixes to restore email sending in Outlook.
Key Takeaways: Fixing Outlook Error 0x8004010F for Office 365
- File > Account Settings > Repair: Repairs the current Outlook profile and re-establishes the connection to Office 365.
- Delete the Autodiscover cache: Removes corrupted XML files that prevent Outlook from finding the correct server.
- Create a new Outlook profile: Resolves profile corruption that triggers error 0x8004010F.
Why Outlook Error 0x8004010F Occurs with Office 365
Error 0x8004010F translates to “Cannot access the Outlook data file” or “The operation failed.” When sending email through Office 365, Outlook uses Autodiscover to locate the Exchange server endpoint. If the Autodiscover cache becomes corrupt or contains stale entries, Outlook cannot resolve the server URL and fails with this error.
The error also appears when the local Outlook profile is damaged. A profile stores your email account settings, server information, and cached credentials. If the profile is missing the correct Office 365 server path, Outlook cannot send messages.
Another common cause is a damaged offline Outlook data file. Outlook creates an OST file to store a local copy of your mailbox. If this file becomes oversized or corrupt, the send operation triggers error 0x8004010F.
When Does This Error Occur?
The error appears in these scenarios:
- After a Windows or Office update changes Autodiscover settings.
- When switching from one Office 365 tenant to another without clearing the cache.
- After a mailbox migration from on-premises Exchange to Exchange Online.
- When the Outlook profile is manually edited and the server field is left empty.
Steps to Fix Error 0x8004010F in Outlook for Office 365
Follow these methods in order. Test sending an email after each step before proceeding to the next.
Method 1: Repair the Current Outlook Profile
- Open Account Settings
In Outlook, go to File > Account Settings > Account Settings. - Select your Office 365 account
Click your Office 365 email address in the list. Click Repair. - Follow the repair wizard
Outlook runs a diagnostic and reconnects to the server. When finished, restart Outlook and send a test message.
Method 2: Delete the Autodiscover Cache
- Close Outlook
Make sure Outlook is fully closed. Check Task Manager for any running Outlook processes. - Open the Autodiscover cache folder
Press Windows key + R, type%localappdata%\Microsoft\Outlook, and press Enter. - Delete the XML cache files
Look for files namedAutodiscover.xmlor files starting with your email domain (likecontoso.com.xml). Select them and press Delete. - Restart Outlook
Open Outlook. It will perform a fresh Autodiscover lookup and rebuild the cache. Try sending an email.
Method 3: Create a New Outlook Profile
- Open Mail setup in Control Panel
Press Windows key + R, typecontrol panel, and press Enter. Set View to Large Icons and click Mail (Microsoft Outlook 365). - Create a new profile
Click Show Profiles. Click Add, type a name like “Office365-New”, and click OK. Enter your Office 365 email and password. Wait for the setup to complete. - Set the new profile as default
Under When starting Microsoft Outlook, select Always use this profile. Choose the new profile from the dropdown. Click Apply and OK. - Test sending
Open Outlook with the new profile. Compose and send a message. If it succeeds, you can delete the old profile from the same Show Profiles window.
Method 4: Rebuild the Outlook Data File
- Close Outlook
Ensure Outlook is not running. - Open Scanpst.exe
Press Windows key + R, type%programfiles%\Microsoft Office\root\Office16\SCANPST.EXE, and press Enter. For 32-bit Office, use%programfiles(x86)%instead. - Browse to the OST file
Press Windows key + R, type%localappdata%\Microsoft\Outlook, and press Enter. Locate your OST file (usually your email address with .ost extension). Note the path. - Run the scan
In Scanpst.exe, click Browse and select the OST file. Click Start. Allow the scan to finish. If errors are found, click Repair. - Restart Outlook
Open Outlook and test sending. If the error persists, close Outlook and delete the OST file. Outlook will download a fresh copy from the server when you restart.
What to Do If Outlook Still Shows Error 0x8004010F
Office 365 Account Password Changed Recently
If you changed your Office 365 password and did not update it in Outlook, the error appears. Go to File > Account Settings > Account Settings. Select your account and click Change. Enter the new password and click Next. Restart Outlook.
Outlook in Offline Mode
Outlook may be working offline. Look at the bottom-right corner of the Outlook window. If you see “Working Offline,” click the Send/Receive tab and click Work Offline to toggle it off. Try sending again.
Antivirus or Firewall Blocking Autodiscover
Some security software blocks the Autodiscover connection. Temporarily disable your antivirus or firewall. Open Outlook and send a test message. If the error disappears, add an exception for Outlook and the Autodiscover domain (outlook.office365.com and all subdomains) in your security software.
Corrupt Outlook Navigation Pane
A damaged navigation pane can prevent profile loading. Close Outlook. Press Windows key + R, type %appdata%\Microsoft\Outlook, and press Enter. Rename the file Outlook.xml to Outlook.old. Restart Outlook. Outlook creates a fresh navigation pane file.
Manual Profile Setup vs Autodiscover: Key Differences
| Item | Manual Profile Setup | Autodiscover |
|---|---|---|
| Server address | User must enter Exchange server URL manually | Outlook retrieves server URL automatically from Office 365 |
| Error 0x8004010F risk | High if server address is typed incorrectly | Low unless Autodiscover cache is corrupted |
| Setup time | 5-10 minutes with correct server details | 1-2 minutes using email address and password only |
| Maintenance | Manual update required if server changes | Automatic updates via Autodiscover |
| Recommended for | On-premises Exchange with no Autodiscover | Office 365 and Exchange Online |
Error 0x8004010F in Outlook for Office 365 is caused by a corrupted Autodiscover cache, a damaged profile, or a broken OST file. Use the repair profile, delete the Autodiscover XML files, or create a new profile to resolve the error. After fixing the issue, keep the Outlook data file size under 50 GB and run Scanpst.exe monthly to prevent future corruption.