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

This widget could not be displayed.

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.

This widget could not be displayed.
Daniel Wester Community Champion Jun 22, 2016

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

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

66 views 0 1
Join discussion

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