keelapps

keelapps/Mail Templates/Documentation

Mail Templates for Jira — documentation

Before you start

Mail Templates is an additional notification channel. Jira keeps sending whatever its own notification scheme is configured to send; this app adds a templated message on top, aimed at people who would otherwise receive nothing. It cannot suppress Jira's own mail — Forge gives apps no hook for that. Plan around that from the start, and see avoiding duplicate mail.

Turn it on for a project

You need to be a project administrator for that project, or a Jira administrator. The check runs as you, not as the app.

  1. Open the project, then Mail Templates in the project's tab bar (it may be under More).
  2. Pick one of the three event tabs and tick Send an email when…
  3. Write a subject and body, or press Start from an example to load a working template.
  4. Choose the recipients, then Save.

A project with no configuration sends nothing. Remove from this project deletes that project's rules entirely.

The three events

TabFires when
Issue createda new issue is created in the project
Status changedan edit moves the issue between statuses — other field edits are ignored
Comment addeda comment is added to an issue

Each tab has its own subject, body, recipients and on/off switch. Turning one on has no effect on the others.

Template variables

Both the subject and the body interpolate these. Anything that is not a known variable is left exactly as typed — so a typo shows up in the message as {{isue.key}} rather than silently vanishing.

VariableValue
{{issue.key}}ENG-1234
{{issue.summary}}the issue's summary line
{{issue.status}}current status name
{{issue.issuetype}}Bug, Task, Story…
{{issue.priority}}priority name
{{issue.assignee}}assignee display name
{{issue.reporter}}reporter display name
{{issue.labels}}comma-separated labels
{{issue.duedate}}due date
{{issue.created}}creation timestamp
{{issue.updated}}last update timestamp
{{issue.url}}link to the issue
{{project.key}}ENG
{{project.name}}Engineering
{{actor.name}}who triggered the event
{{transition.from}}previous status — status-change rules only
{{transition.to}}new status — status-change rules only
{{comment.body}}the comment text — comment rules only
{{comment.author}}who commented — comment rules only

The body accepts a small markdown subset: **bold**, *italic*, - bullets, #### headings and [links](https://…). Anything else is sent as plain text. The preview below the editor is rendered by the same code that sends the real message.

The app reads only the issue fields your template actually references. A template that never mentions {{issue.priority}} causes no read of priority.

Recipients

Tick any combination of Reporter, Assignee, Watchers and Voters, and add named people or Jira groups under Specific people. The point of the app is that last part: a group or a fixed list that is not on the watcher list.

Everyone on the list still has to be able to see the issue. Jira drops recipients who cannot, so a rule can never widen who has access to what.

A rule that addresses nobody sends nothing and records Nobody to send to in the log.

Site settings and quotas

Jira administrators get a site page under Settings → Apps → Mail Templates for Jira. It carries a site-wide kill switch, hourly send limits per project and for the whole site, and the list of projects that have rules configured.

The limits exist because a bulk edit of five hundred issues is five hundred events. When a limit is reached the remaining events are recorded as Hourly limit reached rather than being sent.

Reading the send log

The Recent sends tab lists the most recent events for the project, whatever happened to them. An app that silently does nothing is the most confusing thing it can be, so every outcome is named.

ResultMeaning
Senthanded to Jira for delivery
Turned offthe rule, the project or the site switch was off when the event arrived
No matching rulenothing was configured for that event type
Already senta duplicate delivery of the same event; one event, one email
Hourly limit reachedthe project or site quota was exhausted for that hour
Nobody to send tothe rule addressed no one, or Jira dropped everyone for lack of access
No subscriptionthe site's subscription has lapsed — see below
Blocked by JiraJira refused the send; the detail column carries its reason
Faileda transient error; these are retried

If the subscription lapses, the app stops sending and records No subscription against each event. Mail goes out under your organisation's name and cannot be recalled, so this is the one thing the app refuses rather than assumes. Your configuration stays readable throughout.

Why did no email arrive?

Work down this list; the send log answers most of it.

  1. Is the rule on? Each event tab has its own tick box.
  2. Is the site switch on? Check the admin page.
  3. Did the event actually match? A status change needs a real status transition; editing a summary is not one.
  4. Can the recipient see the issue? Jira drops those who cannot — the log says Nobody to send to.
  5. Was the hourly limit hit? The log says so.
  6. Is the subscription active? The log says No subscription.

Delivery itself is Jira's. Once the log says Sent, the message is in Jira's notification pipeline and lands wherever that user's Jira notifications normally land.

Avoiding duplicate mail

Someone who is already notified by Jira's own scheme — a watcher, say — will get two messages: Jira's and yours. To stop that, switch the matching event off in the project's notification scheme in Jira.

Check what else uses that scheme first. Notification schemes are frequently shared between projects, and turning an event off affects all of them.

Permissions

The app asks for four things, and none of them can change your Jira data:

ScopeWhat it is for
read:jira-workread the issue fields a template references, tell a status transition from any other edit, and check whether the caller is a project admin
read:jira-userresolve names for the recipient picker
send:notification:jirathe only write permission, and it permits exactly one call: handing a message to Jira's notification service
storage:apprules, send log, quota counters, dedupe claims

There is no external permission, so the app cannot reach any host outside Atlassian — Forge enforces that at the platform level, not on our word.

What it will never do

These are deliberate and permanent. Each one would require either egress or permissions that this product exists to avoid: