Hi!
I'm using the following Groovy Code through a Script Listener what perfectly does the Job.
Long EVENT_ID = new Long("10300")
ApplicationUser currentUser
IssueEventBundle eventBundle
JiraAuthenticationContext jiraAuthContext = ComponentAccessor.getJiraAuthenticationContext()
IssueEventManager issueEventM = ComponentAccessor.getIssueEventManager()
IssueEventBundleFactory issueEventFactory = (IssueEventBundleFactory) ComponentAccessor.getComponent(IssueEventBundleFactory.class)
currentUser = jiraAuthContext.getUser()
eventBundle = issueEventFactory.wrapInBundle(new IssueEvent (issue, null, currentUser, EVENT_ID, true))
issueEventM.dispatchEvent(eventBundle) Basically the Code triggers an email in the end and my only remaining requirement is that the email's Sender is NOT the current logged in user (current state with implementation).
The email's Sender should be "Helpdesk", therefore I even created an user "Helpdesk" with appropriate application Access and even assigned a valid mail address to it but when the mail is send by the Code above the Sender is still the currently logged in user.
I tried to Change the ApplicationUser currentUser line but to no avail.
I appreciate any hint. Thanks in advance!
Best regards,
Birgit