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 vote

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 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 55m ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

43 views 3 3
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