How do I send email notifiactions to page watches via a plugin module

I am devloping a plugin, and I have a servlet in which I want to be able to send a custom email to all watches of the page, so it looks like a normal confluence notification, with the start of the body reading: "Your action is needed on this page" and then the usual page link and extract...

How can I do this?

I have found the NotificationManager, but I can't see how to send a custom email. Also I'm not sure how to find all the watches, or how to send to all watches. I would have thought this would have a simple API?

Please help...

2 answers

1 accepted

I found out the answer, and it's not as easy as I thought, using the example: https://developer.atlassian.com/display/CONFDEV/Sending+Emails+in+a+Plugin

I need to go through every user in Confluence, verify if they are watching the page in question, then send off a custom email.

It's not nice and lots of code to send a confluence looking email.

Hi Chris,

https://developer.atlassian.com/display/CONFDEV/Posting+Notifications+in+Confluence

plugin module in confluence might help you...

Regards

Onkar Ahire!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 8 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

85 views 2 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you