Sending mail through Administration screen causes javax.mail.SendFailedException: Invalid Addresses

Platform Notice: Data Center Only - This article only applies to Atlassian products 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

Symptoms

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 TP-Processor52 ERROR admin 1398x54390x2 11yr7f5 75.18.163.189 /secure/admin/SendBulkMail.jspa [action.admin.mail.SendBulkMail] Failed to s end email to : user.A@atlassian.com,user.B@atlassian.com,user.C@atlassian.com,user.D@safenet-inc.com,user.E@safenet-inc.com,?, ... 2013-11-16 23:21:48,056 TP-Processor52 ERROR admin 1398x54390x2 11yr7f5 75.18.163.189 /secure/admin/SendBulkMail.jspa [action.admin.mail.SendBulkMail] Error sendi ng e-mail. com.atlassian.mail.MailException: javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address

Diagnosis

You will see that in the UI, an error will also appear and some of the users will have a '?' as the "email" value.

Causes

  1. There are some users who are still listed in JIRA projects in some of the roles, but they do no longer exist in the cwd_user table. You can check this list by following this query:

    1 SELECT * FROM projectroleactor WHERE roletypeparameter NOT IN (SELECT user_name FROM cwd_user) AND roletype='atlassian-user-role-actor';
  2. Some users are missing a valid e-mail addres

    1 select * from cwd_user cu where lower_email_address NOT LIKE '%_@__%.__%';

Resolution

Cause 1:

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Generate an XML Backup (Administration -> System -> Import & Export) so in case anything goes wrong we have a file to rollback the instance;

  2. Shutdown JIRA;

  3. Run the following query in the database to remove these users from the roles:

    1 DELETE FROM projectroleactor WHERE roletypeparameter NOT IN (SELECT user_name FROM cwd_user) AND roletype='atlassian-user-role-actor';
  4. Start JIRA;

  5. Try to send the bulk mail;

  6. Check if the problem persists;

Cause 2:

  1. Update users e-mail addresses to a valid address. Please note that users coming from an LDAP directory may need to have their e-mail addresses updated directly in the LDAP server.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.