Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
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

2 votes


3 other answers

Permanent link
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/.

2 votes


Permanent link
Thank you both. It sure was helpful!

0 votes


Permanent link
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.

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 70

Question asked: Oct 24 '13, 3:12 a.m.

Question was seen: 8,654 times

Last updated: Oct 30 '13, 5:22 a.m.

Confirmation Cancel Confirm