Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

Excerpt

Sends an email.

To and  and cc are  are string arrays with any of email addresses, users or groups, in which case an email will be . Email is sent to all the users of the groups.from is optional; if

From is optional. If missing the email will be is sent from the default email address configured in JIRAJira.

The last parameter is the language and it is available in the full form of the routine. To pass the language , you must specify the 'sender', 'to', 'cc', 'subject', 'body' and finally the 'language', as a string  (e.g. string (for instance "en", "fr", "en_US", "ro", etc.). However, this is relevant only if you use templates , since these support internationalization. as they support localization.

For example, an email sent with language "en" will look for templates in the folder called "en", inside the default template directory. If no such template is found, it will use the one in the default directory.

Also, since starting with katl-commons-1.1.1, a default template placed in the default directory is mandatory for each template name used in your SIL programs. For example, if you want to use a template "t.tpl" using language "en_US", it is not only necessary to have "t.tpl" in the "en_US" folder, but you must also have to have a file "t.tpl" in the default directory.

If you don't specify the language parameter and you use templates, by default the messages are sent in the sender defined language. For the users that are JIRA Jira users ('to' or 'cc' are user names and not email addresses) it can be used the language defined in the user profile(for each user) is used for the sending of the email, by configuring it email sending. For the rest of the users the email will be is sent using the sender defined language. 

Starting from with version 4.0, the engine automatically detects HTML or plain text messages.

...

Note

If you would like to use templates for emails, see the Mail Configurationconfiguration page, as well as detailed explanations linked our template engine: SIL Template Languagelanguage. Specifically, read Email Templatestemplates page.


Note

 In order for the HTML to be rendered all right, it needs to be written right (using the <html> and <body> tags).

...