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.

https://jira.atlassian.com/browse/CONFSERVER-35294

https://community.atlassian.com/t5/Questions-for-Confluence/How-to-change-the-email-notifications-to-remove-content/qaq-p/52723

Is there any solution?

Thanks

2 answers

1 accepted

0 vote

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

https://confluence.atlassian.com/doc/customizing-email-templates-168001822.html

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 \
templates/content/contextual-excerpt-pattern-2.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
{else}
<div>
{call .inlineContentStyles}
{param content: $content /}
{/call}
</div>
{/if}

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

 

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
Sarah Goff-Dupont
Published 3 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, ...

38 views 2 3
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