How much storage does a Salesforce email use?
EmailMessage storage measured in a test org: body size, the Recycle Bin, and what archiving freed.
Read the guideORGZIP / GUIDES
Start with Setup → Storage Usage for the total, then run five read-only SOQL queries to see which Cases, which years and which direction of email hold the weight. Nothing here changes data.
Storage Usage updates with a delay and shows rounded figures. Read it twice, a day apart, before you plan around a number.
Use the Developer Console Query Editor or the Salesforce CLI. In a very large org, an aggregate query can time out; add a date filter such as CreatedDate < LAST_N_DAYS:365 and run it per year.
1. Cases with the most emails. Long threads are the first candidates.
SELECT ParentId, COUNT(Id) emailsFROM EmailMessageGROUP BY ParentIdORDER BY COUNT(Id) DESCLIMIT 502. Emails on Cases closed more than a year ago. These are usually safe to archive, because nobody is working the Case.
SELECT COUNT()FROM EmailMessageWHERE Parent.IsClosed = trueAND Parent.ClosedDate < LAST_N_DAYS:3653. Emails by year. Shows how fast storage is growing.
SELECT CALENDAR_YEAR(CreatedDate) yr, COUNT(Id) emailsFROM EmailMessageGROUP BY CALENDAR_YEAR(CreatedDate)ORDER BY CALENDAR_YEAR(CreatedDate)4. Incoming versus outgoing. Outgoing replies often carry the whole quoted thread.
SELECT Incoming, COUNT(Id) emailsFROM EmailMessageGROUP BY Incoming5. The Tasks your emails created. In our test org, every outgoing email created a Task with TaskSubtype = Email: 46 outgoing emails, 46 Tasks. They count toward Data Storage too.
SELECT TaskSubtype, COUNT(Id) tasksFROM TaskGROUP BY TaskSubtype| If you see | It usually means | What to do |
|---|---|---|
| A few Cases with hundreds of emails | Long threads, auto-replies or a loop between two mailboxes. | Check for an email loop first. Then archive the closed ones as a batch. |
| Most emails sit on Cases closed over a year ago | Storage is history nobody works on but somebody may need to read. | Archive with a retention window instead of deleting, so agents can still find them. |
| Steady growth year on year | Volume, not a one-off import. | Plan a recurring archive job, not a one-time clean-up. |
| Many outgoing emails and as many Email Tasks | Replies with quoted threads, plus a Task per email. | Archive the email and its Task together so the history stays whole. |
To turn the counts into money, put the GB you could free and your contract price per GB into the storage calculator. For the measured overhead of archiving, see how much storage a Salesforce email uses.
Open Setup, then Storage Usage. The Data Storage table lists EmailMessage with its record count and storage. Divide storage by record count to get the average size per email in your org.
Not directly. TextBody and HtmlBody are long text fields, so SOQL cannot sort, group or sum by their length. Use counts per Case and per age to find where emails pile up, and the Storage Usage average to estimate size.
Because email bodies are counted by size. In our test org, 300 emails of about 96 KB each added about 28 MB to Data Storage. Long HTML emails and quoted reply chains push the average up.
Attachments count toward File Storage, not Data Storage. Check them separately before you decide what to archive or delete.
EmailMessage storage measured in a test org: body size, the Recycle Bin, and what archiving freed.
Read the guideWhat happens at the limit, what frees space, and a checklist for the first 24 hours.
Read the guideWhat a PDF keeps and loses compared with an archive: search, reply, restore and cost.
Read the guideOrgZip’s read-only assessment counts emails, Tasks and Events per object and age, and estimates the Data Storage you could free after the archive’s own overhead. It changes nothing in your org.