It's all about the answers!

Ask a question

RTC plugin for sending notification Email


Idan Shanny (124) | asked Oct 24 '13, 3:12 a.m.
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


permanent link
Aradhya K (1.4k44345) | answered Oct 24 '13, 4:10 a.m.
JAZZ DEVELOPER
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



permanent link
Ralph Schoon (56.6k23642) | 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/.

permanent link
Idan Shanny (124) | answered Oct 30 '13, 5:17 a.m.
Thank you both. It sure was helpful!

permanent link
Ralph Schoon (56.6k23642) | 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


Register or to post your answer.