Outgoing Mail configuration
This guide explains how to configure the outgoing mail functionality for the Power Scripts for Jira Cloud. These settings control the global mail configuration used by the sendMail()
function, letting you customize how the system sends emails to recipients. Understanding these configuration options is essential for system administrators and developers who need to implement email notifications, alerts, or other automated communications through Power Scripts.
How to access the Outgoing Mail configuration
To access the Outgoing Mail configuration:
Open the Jira admin settings and select Apps.
Go to Power Apps Config > Integrations > Outgoing Mail.
Key configuration settings
The Outgoing Mail configuration consists of three primary elements: email templates, mail language settings, and mail sender type.
Configuration setting | Type | Description |
---|---|---|
Mail Templates Directory | field | Specifies where email templates are stored and how they're organized. The default Mail Templates Directory is Both the sendEmail and executeTemplate functions use this path. |
Mail language on | drop-down menu | Controls which language is used for emails. Options include:
|
Send mail via | drop-down menu | Determines how emails are delivered from the system. Options include:
Note that a mail that has been successfully sent does not mean that the recipient got the mail. It can be rejected for multiple reasons. SMTP does not guarantee delivery. If you are unsure what to fill in in the Direct sender, custom configuration form, ask your network administrator to provide details of your company mail setup. |
Understanding email templates
Email templates in Power Scripts for Jira Cloud support multiple languages, enabling you to send emails in the appropriate language based on either the sender's or receiver's language preference.
Email templates are text files with a
.tpl
extension.They are stored in the Mail Templates Directory you specify and must follow a specific naming convention for proper language detection.
Templates can contain HTML, plain text, or a combination, along with Simple Template Language (STL) code.
You can create and edit templates using one of the following:
Any text editor of your choice.
The built-in template editor in SIL Manager, accessible from the
kepler
home tree view as shown in the screenshot below:Templates folder in SIL Manager
For optimal language resolution, we recommend organizing your email templates in the following structure within your specified templates directory:
For… | Use… | Example |
---|---|---|
Language and country-specific templates |
|
|
For language-only templates |
|
|
For default templates |
|
|
This structure aligns with the language resolution algorithm described below and ensures your templates will be properly selected based on language preferences.
How language resolution works
The system uses a hierarchical approach to locate the appropriate template for a given language. Let's walk through an example with the template file mytemplate.tpl
for a French (France) user. The table below outlines the key steps of the language resolution process:
1 | First search | The system looks for
|
2 | Second search | If not found, the system looks for
|
3 | Fallback search | If still not found, the system looks for
|
4 | Error case | If none of these files exist, the system returns an error. |
How to create template content with SIL Template Language (STL)
Within your email templates, you can include dynamic content using STL.
For basic field references, use the $field$
notation to insert any standard or custom field value from the issue that triggered the email. For example:
Hello $assignee$,
A new issue ($key$) has been assigned to you by $reporter$.
More advanced uses of STL includes embedding SIL scripts within the email templates, enabling sophisticated dynamic content, such as:
Conditional sections (showing content only under certain conditions)
Loops (generating repeated content, such as table rows)
Complex calculations or text formatting
For detailed information on using STL in your templates, please refer to the SIL Template Language and Email templates pages.
Understanding the mail language settings
The Mail language on option you set in your Outgoing Mail configuration affects how templates are selected and emails are sent:
When set to… | Then… | Use for… |
---|---|---|
Sender |
| Simpler, efficient processing. |
Receiver |
| More personalized experience for recipients. Using this option can result in multiple emails being sent for a single action, higher resource usage (memofy and processing). It can also have an impact on performance, especially when using email queues. |
More configuration guides
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.