The "Mail Error Queue" Health Check fails due to the error "'To' is a required field" in Jira Data Center

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Jira Data Center 9.8.0 introduced a new health check meant to monitor the Mail Error Queue. When Jira fails to send emails from the Mail Queue due to some error, this health check will fail.

This KB article will focus on the error 'To' is a required field and how to resolve it, while there could be other errors making the Health Check fail.

Diagnosis

  • Check the Jira outgoing mail logs. If you find the error below, then this KB article is relevant:

2025-03-26 08:04:56,653+0000 ERROR [] Caesium-1-1 anonymous [c.a.m.o.c.a.j.p.i.batching.cron.BatchNotificationJob] Exception during sending mail java.lang.IllegalArgumentException: 'To' is a required field at com.atlassian.mail.Email.<init>(Email.java:56) [atlassian-mail-7.0.4.jar:?] at com.atlassian.jira.mail.Email.<init>(Email.java:61) [jira-api-10.3.3.jar:?] at com.atlassian.jira.mail.Email.<init>(Email.java:46) [jira-api-10.3.3.jar:?] at com.atlassian.jira.plugins.inform.batching.BatcherServiceImpl.createEmail(BatcherServiceImpl.java:147) [batching-plugin-4.1.3.jar:?] at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.sendEmail(BatchNotificationJob.java:161) [batching-plugin-4.1.3.jar:?] at com.atlassian.jira.p
  • Run the SQL query below. If the query returns any result, then it meant that there are Jira user accounts without an email address:

SELECT * FROM cwd_user WHERE lower_email_address IS NULL OR email_address IS NULL;

Cause

Why is Jira throwing the error "'To' is a required field"?

For the Jira application to send notifications to users, these users need to have a valid non empty email address. When a Jira user is manually created via the UI, the email address field is a mandatory, therefore users cannot be created with an empty email address.

However, when Jira users are synced with an external LDAP directory (such as AD), if the user is missing an email address, such user will also be missing an email address once synced into Jira.

As a result, when Jira tries to send a notification to these users, it will fail with the error "'To' is a required field" since these users don't have an email address.

Solution

Fixing the error "'To' is a required field"

  • Reach out to your external LDAP directory admin, and have them fix the users (found by the SQL query) who are missing an email address

  • Sync Jira again with the LDAP directory via Administration > User Management > User Directories

  • Go to Administration > User Management > Users, and verify that the impacted users have a non empty email address

  • Go to Administration > System > Mail Queue > Error Queue, and select Delete error queue to remove old invalid emails

  • Generate new notifications meant for the impacted users, and confirm that the notifications are sent without the error 'To' is a required field

Updated on September 26, 2025

Still need help?

The Atlassian Community is here for you.