Disable content in notification emails?

Hello, a basic advantage of confluence is that information can be stored in a central and safe place rather than being sent around in lots of emails.
However, big portions of information are included in the notification mails.

We would like to keep people informed about changes with email notifications but disable the content. I found those posts related to this issue but I didn’t find a solution.



Is there any solution?


5 answers

1 accepted

0 votes
Accepted answer

You're in the right area.   You'll end up just needing to edit the SOY template to remove the content and comments.


None of this is basically supported by Atlassian, and you'll have to put these changes back in place manually after every upgrade you do to confluence.

Thank you for your quick response! Editing SOY templates in jar files is a rather difficult job for me - I will try ...

I have to do this as well.  A checkbox would be much easier.  I haven't looked into the details.  I think it wouldn't be awful to add the dark configuration that defines a property that is used in the soy if/else condition that removes the content and subsittues with the value of the property (e.g. Sign-on to view content).  that might be an enhancement.  

Without that, you can do something like the following:

jar xvf <basedir>/atlassian-confluence-<version>/confluence/WEB-INF/atlassian-bundled-plugins/confluence-email-notifications-plugin-<version>.jar \
templates/content/content-excerpt-pattern-1.0.0.soy \
templates/content/content-excerpt-pattern-2.0.0.soy \
templates/content/contextual-excerpt-pattern-1.0.0.soy \

Then edit the four files.  I think only 2.0.0 are used.

In the content-excerpt-patterns' change $contentExcerpt within the {param} to 'Sign-on to view Content'

In the contextual (AFAIK just comments) change {$inlineContext } to 'Sign-on to view Content'.  The context is setup with {call} for the response, that was tricky I couldn't just edit, I had to add a condition.

{if 1}
Sign-on to view content
{call .inlineContentStyles}
{param content: $content /}

1 is always true and always prints the Sign-on to view content.

jar uvf and restart.

I went from 5.5.3 to 5.9.14 and this worked.  5.5.3 was way different, I don't think there were as many soy methods/conditions.  Just parameters passed in and expanded with the $.




Then update: 

jar uvf <basedir>/atlassian-confluence-<version>/confluence/WEB-INF/atlassian-bundled-plugins/confluence-email-notifications-plugin-<version>.jar templates/content/content-excerpt-pattern-1.0.0.soy templates/content/content-excerpt-pattern-2.0.0.soy templates/content/contextual-excerpt-pattern-1.0.0.soy templates/content/contextual-excerpt-pattern-2.0.0.soy


I will add this is one of the harder parts about upgrades in Confluence.  You _can_ modify the templates to not include email content, and so you _have_have to if you want to upgrade.  But then the very tedious testing for comments on images, pages, in-line, etc.  Meshing style sheets and plugins are at least things you can do on-line.  

Where if you miss one template, and the sensitive content is sent to an address a space owner has allowed access to someone, and that someone was setup by Contracting and has  his personal email address for his account, now it involves all the people you don't want to involved.

And when you switch from Velocity to Soy to that new thing, oh.. nightmare.

Vote if it helps. 

My problem is our instance is in Atlassian cloud rather than local, which, if I understand correctly, means I cannot edit email templates.

1 vote

Same problem here - email is insecure, so notifications with content is a no-no if you have to go through something like HIPAA compliance to secure your processes. This is a huge oversight by Atlassian.

I've linked a few issue at https://jira.atlassian.com/browse/CONFSERVER-35294 that are related to this security issue. Maybe that helps and things improve here one day. 

Is anybody aware of any plug-ins that address this?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in New to Confluence

How to use Confluence Cloud for stakeholder management

Most of us don’t need much convincing that stakeholder management is important. It just makes sense that keeping everyone in-the-know on projects and assigning clearly defined roles is key to having ...

1,150 views 4 6
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