-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 10.2.15, 10.2.18
-
Component/s: Server - Mail Archiving
-
2
-
Severity 3 - Minor
-
6
Issue Summary
In Confluence Data Center 10.2.x, opening any archived email in a space's Mail Archive fails with "System Error: A system error has occurred — our apologies!" (HTTP 500) if the space has a mail account configured.
The page tries to find the previous and next emails in the space. That lookup (DefaultMailContentManager.getFirstMailBefore(), called from ViewMailAction.getPreviousMail()) returns any CUSTOM content object in the space, not only mail objects. In 10.x, a space's mail accounts are saved as a space content property, atlassian.confluence.space.mailaccounts. That property is also a CUSTOM content object in the same space, so the lookup returns it. ContentBackedMail then rejects it with an IllegalArgumentException, and the page fails to render.
Affects version: Confluence Data Center 10.2.x ( tested on 10.2.15 , 10.2.18, component: Mail Archiving, which is a bundled plugin)
Steps to Reproduce
- Create a space (for example, key TEST).
- Add a mail account to the space: go to Space tools → Mail → Mail Accounts → Add mail account (for example, POP, host mail, port 3110) and save it.
- Add some emails to the archive. Either let the account fetch mail, or go to Space tools → Mail → Import mbox and import a small mbox file, for example: ( attached the mbox file)
From webform@lab.local Wed Sep 30 11:00:00 2026 From: webform@lab.local To: support@lab.local Subject: WF:: Repro mail 1 Message-ID: <repro-1@webform.lab.local> Date: Wed, 30 Sep 2026 11:00:00 +0000 Content-Type: text/plain; charset=UTF-8 Repro body 1
4. Go to Space → Mail (<base-url>/mail/archive/viewmailarchive.action?key=TEST).
5. Click any email.
Expected Results
The archived email opens normally.
Actual Results
The page fails with HTTP 500 – "System Error: A system error has occurred — our apologies!" Every email in the space is affected, because the lookup picks up the mail-accounts object as the "previous" (or "next") item.
The below exception is thrown in the atlassian-confluence.log file:
ERROR [http-nio-8090-exec-6] [apache.struts2.dispatcher.DefaultDispatcherErrorHandler] sendErrorResponse Exception occurred during processing request: Error rendering template for decorator root -- url: /confluence/display/TEST/mail/1638404 | userName: admin | traceId: c26e17db66324b4b ... Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getPreviousMail' in class com.atlassian.confluence.mail.archive.actions.ViewMailAction threw exception java.lang.IllegalArgumentException: Object [com.atlassian.confluence.plugins.confluence-content-property-storage:content-property] custom: atlassian.confluence.space.mailaccounts v.1 (1638401) is not a Mail content object. ... Caused by: java.lang.IllegalArgumentException: Object [com.atlassian.confluence.plugins.confluence-content-property-storage:content-property] custom: atlassian.confluence.space.mailaccounts v.1 (1638401) is not a Mail content object. at com.atlassian.confluence.mail.archive.content.ContentBackedMail.<init>(ContentBackedMail.java:53) at com.atlassian.confluence.mail.archive.content.ContentBackedMail.newInstance(ContentBackedMail.java:48) at com.atlassian.confluence.mail.archive.content.DefaultMailContentManager.getFirstMailBefore(DefaultMailContentManager.java:66) at com.atlassian.confluence.mail.archive.actions.ViewMailAction.getPreviousMail(ViewMailAction.java:65)
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available