Sending mail through Administration screen causes javax.mail.SendFailedException: Invalid Addresses
The following appears in the
TP-Processor52 ERROR admin 1398x54390x2 11yr7f5 220.127.116.11 /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 18.104.22.168 /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
You will see that in the UI, an error will also appear and some of the users will have a '?' as the "email" value.
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';
Some users are missing a valid e-mail addres
select * from cwd_user cu where lower_email_address NOT LIKE '%_@__%.__%';
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
- Generate an XML Backup (Administration -> System -> Import & Export) so in case anything goes wrong we have a file to rollback the instance;
- Shutdown JIRA;
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';
- Start JIRA;
- Try to send the bulk mail;
Check if the problem persists;
- 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.