Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,689
Community Members
 
Community Events
165
Community Groups

How to send email notifications to external users( non-licensed users)?

Hi ,

Is there a way to send email notifications to external users( non-licenced users ) using jira mail handler ?

we are using the jira server version of 8.1.3

 we want to send the notification to the sender( non-jira user) when the request is created by jira mail handler.

 Quick response would be highly appreciated. 

Thanks

1 answer

Hi @Srikanth If jira is creating issue of external users email… it means default reporter is set … that’s why issues are creating . 
1. Instead of Setting default reporter . Check create new users .. so that user account created in jira system and user received issue creation email. Remove user from jira-users group to save license 

2. Use script runner plug-in to capture email address and send email notification when issue get created.

Thanks

vikrant yadav

Hi @Vikrant Yadav 

thanks for the response.. 

1. we are using external user management to create users and users will be added to jira through Active directory only. so i don't think that Create user option will help in our case.

2. Do we have any in-built script in script runner plug-in to cpature email address or do we need to write some script using scripr runner plug-in..?

Regards

Srikanth

Hi @Srikanth  Try below script to capture email address, script capture email address from Description field and paste it in a Text field:- 

Apply  this in Post function at top :- 

import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.component.ComponentAccessor
import java.util.regex.Matcher
import java.util.regex.Pattern

def customFieldManager = ComponentAccessor.getCustomFieldManager()

def desc = issue.getDescription()

def result = desc.substring(desc.lastIndexOf("mailto:") + 7, desc.indexOf(">"))


def targetField = customFieldManager.getCustomFieldObjects(issue).find {it.name == "Employee Email"}

def changeHolder = new DefaultIssueChangeHolder()

targetField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(targetField), result),changeHolder)

 After Issue Created Event post function, apply one more Script runner post function , "Send Custom Email(SR) " 

In This post function, select Email field in To field. 

Thanks

Hi @Vikrant Yadav 

I am looking for same feature within our Jira cloud and I read your idea but unsure on how to achieve this. Have some questions on your ideas.

1. Instead of Setting default reporter . Check create new users .. so that user account created in jira system and user received issue creation email. Remove user from jira-users group to save license 

  • Once the new users are created how do we automatically remove users ? Manual effort to remove users everytime user is created a jira ticket seems very cumbersome

2. Use script runner plug-in to capture email address and send email notification when issue get created.

  • Not familiar with script runner at all, and is there a preconfigured code which does the job of sending email to external users (not sure how and where it picks up the email from though) once issue is created 

Hi @Srikanth Mamidala  For JIRA Cloud, easiest way is to use JIRA Automation, to capture email address from Description in a custom field and send email to that captured email address. 

Some similar posts, might helps you :- 

 

https://community.atlassian.com/t5/Automation-questions/How-can-I-pull-the-email-address-from-the-Description-section-of/qaq-p/1521498

 

https://community.atlassian.com/t5/Jira-questions/Automation-Regex-extract-email-address-from-Issue-Description/qaq-p/1714786

 

Thanks

V.Y

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.1.3
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,477 views 37 44
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you