Script runner unable to send email to a distribution list

I am using script runner's custom script option to send a custom email. The script works fine if email is sent to a particular users. However, it fails when being sent to a distribution list. Can you please let me know if there is any configuration which I am missing.(A note: There is no error message in mail queue)

Following is the error message:

Time (on server): Wed Jun 22 2016 18:49:44 GMT-0400 (EDT)

The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.

2016-06-22 18:49:44,357 ERROR [workflow.ScriptWorkflowFunction]: *************************************************************************************
2016-06-22 18:49:44,358 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: DEMO-6, actionId: 4, file: <inline script>
com.atlassian.mail.MailException: javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:214)
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:151)
	at com.atlassian.mail.server.SMTPMailServer$send.call(Unknown Source)
	at Script331.sendEmail(Script331.groovy:87)
	at Script331$_run_closure1.doCall(Script331.groovy:77)
	at Script331.run(Script331.groovy:58)
Caused by: javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1950)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1195)
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendMimeMessage(SMTPMailServerImpl.java:226)
	at com.atlassian.mail.server.managers.EventAwareSMTPMailServer.sendMimeMessage(EventAwareSMTPMailServer.java:25)
	at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:176)
	... 5 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1803)
	... 9 more
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 #5.1.0 Address rejected.
	... 10 more

2 answers

0 votes

That's not a Script Runner or JIRA error.

The email address you are sending the mail to is not known to the email server it is going to.   It's not a valid address.

0 votes

The error is coming from the SMTP server. Is the email address allowed to receive external emails?

 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

436 views 1 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot