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

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears in the atlassian-jira.log:

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:

    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

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



Resolution

Cause 1:

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  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:

    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.

Last modified on Aug 19, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.