RTC plugin for sending notification Email
![]()
I need to write RTC participant plugin that will send, under some circumstances, notification email to several recipients. Obviously, those circumstances are more complex than those that can be configured in the "Mail Configurations" supplied out-of-the-box in RTC.
Now, of course I can use a Java emails class to create this email message, but I'd rather use the built-in emails notifications mechanism of the Jazz system (the same configurable mechanism I mentioned).
Is this possible? Can I approach this service and use it to send emails myself using RTC plugins? How can it be done?
Thanks.
|
Accepted answer
![]()
You can use APIs in the com.ibm.team.repository.service.IMailerService to send mails.
isMailEnabled()
sendMail(MailSender sender, String toAddress, String subject, String msg, String cc)
Methods can be used for this purpose.
Ralph Schoon selected this answer as the correct answer
|
3 other answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Oct 24 '13, 3:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As replied on my blog:
In the server API you can use the built in mail service of the server. No need to use external classes. There is an API available and this has actually been answered on the forum several times already. You can use this in a server side follow up action. You can also create your own extension listening to work item change events and sending mail from them. This would be asynchronous. Several customers have done this. You can not extend the notification we provide. You would create your own handler. I have not yet published any API examples for this on https://rsjazz.wordpress.com/. |
|
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Oct 30 '13, 5:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I had a look into how RTC implements that. RTC uses a Scheduled Service. The code can be found in
com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier in the SDK. I looked into custom event handler, but apparently that only triggers on work item state change. So you would have to go with a participant or a Scheduled Service. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.