ErrorMessageSizeExceeded - Failed to Write Mail
Increase Office 365 mailbox size limits to allow large email migration.
Error Message
Migration Error
Failed to write Mail:[Subject] ErrorMessageSizeExceeded
This error occurs when an email exceeds Office 365 size restrictions.
Size Limit Issue
Root Cause
Email Exceeds Exchange Web Services Limit
The email being migrated is larger than the maximum send/receive size configured in the target Office 365 mailbox. By default, Office 365 has relatively conservative size limits.
Default Office 365 Limits
Office 365 typically defaults to 35 MB for send/receive size limits. Large emails with attachments from other systems may exceed this limit.
Solution
Increase Mailbox Size Limits Using PowerShell
Check Current Settings
First, verify the current size limits for the affected mailbox:
Get-Mailbox user@domain.com | fl mailboxplan,maxsendsize,maxreceivesize
Update Tenant-Wide Limits (New Users)
Set limits for new mailboxes (applies to future users only):
Get-MailboxPlan | Set-MailboxPlan -MaxSendSize 150MB -MaxReceiveSize 150MB
Update Existing Users
Apply new limits to all existing mailboxes:
Get-Mailbox | Set-Mailbox -MaxReceiveSize 150MB -MaxSendSize 150MB
Verify and Retry
Confirm the changes took effect and restart the migration for the affected items.
Post-Migration
Update Single Mailbox
To update just the affected mailbox instead of all mailboxes:
Set-Mailbox user@domain.com -MaxReceiveSize 150MB -MaxSendSize 150MB