Hi,
I am currently able to send email using SMTPMailServer.send, however this method appears to be blocking and returning only when the email has been sent.
What I would like is for the function just to put the email in the JIRA email queue and then return immediately which appear to be the behaviour for standard JIRA notification such as "Send notification on new comment for watched issues".
Is there a way to use the JIRA standard notification engine when sending custom email via groovy SR script?
Thanks,
Roberto
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.mail.Email import com.atlassian.mail.queue.SingleMailQueueItem def email = new Email("jamie@") email.setSubject(..) email.setBody(..) def item = new SingleMailQueueItem(email) ComponentAccessor.getMailQueue().addItem(item)
do you know, how can I do in CLoud, the same?Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert!
Take a look at the IssueEventManager, https://docs.atlassian.com/jira/7.1.0/com/atlassian/jira/event/issue/IssueEventManager.html
Br, Niclas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Might be of interest as well http://www.j-tricks.com/tutorials/sending-mails-from-jira-plugins
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.