Outlook error 0x80040305 occurs when sending email, generating a non-delivery report with "Submit-Message failed" and diagnostic code 0x80040305-0x00000000-0x00000000. Email typically works in Outlook on the web but fails in the desktop client.

Resolution

This error is often caused by having too many nested folders in your primary mailbox (generally over 450-500 total). The Outlook desktop client can hit an internal folder enumeration limit during send operations.

Reduce your folder count:

1. In Outlook, select your mailbox root in the folder pane.

2. Count all nested folders (including subfolders under Inbox, Sent Items, etc.).

3. If the count exceeds 450, delete or consolidate folders:

  • Right-click unneeded folders and select Delete (they move to Deleted Items).
  • Empty the Deleted Items folder.

4. Restart Outlook and test sending.

If the error persists:

Collapse all folders and close open items:

1. In the navigation pane, collapse every expanded folder.

2. Close all open message windows.

3. Avoid clicking "View on Server" or similar links in search results.

4. Restart Outlook.

5. Attempt to send an email immediately.

If the error persists:

Repair your Outlook data file:

GUI method:

1. Close Outlook.

2. Open Control Panel → Mail → Show Profiles.

3. Select your profile → Properties → Data Files.

4. Select your OST/PST file → Settings → Compact Now.

5. If corruption is suspected, use the Repair button or run SCANPST.EXE from your Outlook installation directory.

PowerShell method (deletes the OST file; back up first):

# Close Outlook first, then run as administrator
Remove-Item "$env:LOCALAPPDATA\Microsoft\Outlook\*.ost" -Force

If the error persists:

Disable shared folder downloads:

1. File → Account Settings → Account Settings.

2. Select your Exchange account → Change → More Settings.

3. Go to the Advanced tab and uncheck "Download Shared Folders".

4. Click OK → Next → Finish.

5. Restart Outlook.

If the error persists:

Update Outlook. Microsoft addressed the folder limit issue in Version 2409 (October 2024) and later:

1. File → Office Account → Update Options → Update Now.

2. Allow updates to install completely.

3. Restart Outlook.

Verification

Send a test email. If it sends without error 0x80040305, the issue is resolved. Maintain your folder count below 450 to prevent recurrence on older Outlook versions.