Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Scenario

To demonstrate support for many queues (and different SMTP servers) per Project.

...

We need to setup two custom field values to drive the Notification:

a) Storing the mailbox address (catchemail) in a text single line Custom Field Default

...

Since JEMH 3.3.9 (Jira 8.0.0+) its possible to pick a custom field within JEMH Notification Mappings that will be used to pick the EMQ queue that should be used to deliver a message rendered by JEMH. The logic for determining that is custom velocity logic. The values should be the numeric ID’s of the queues.

Locate the queue ID’s

This is harder than it should be. We will expose this on the Jira Project > Notification summary page, but for now, ID’s can be located by Going to EMQ, and hovering over each EDIT link, and noting the ID shown by the browser at the bottom of the screen, it would be something like the following, so ID would be 2.

Code Block
http://localhost:8080/plugins/servlet/emq/general-configuration#/mailConfiguration/mailQueue/2

...

Example Issue

...

Commenting on EM-1 above, will cause JEMH to render the notification, with a custom From: address defined through the mailbox from address text single line custom field. It will then pass the Email along to EMQ for processing through EMQ Queue #2.

c) Configure Notifications

Configuring Notifications needs two steps, done in order:

(1) Configure the Custom From: address custom field

...

(2) Enable EMQ

Once EMQ is enabled, the above config becomes hidden, but still applies. Here we pick the field we set above in the EMQ Queue custom field Selector.

...

Delivery

EMQ queues individually can be set to Immediate or Digested delivery. Immediate Delivery will result in the Email built by JEMH being sent ‘as is' (including custom from: address) through the nominated queue SMTP Outbound server. If Digested delivery is set, then the content of the email is extracted and stored, the custom From: details are discarded, so in this case, the Email from: address: would be re-set based on the EMQ Queue settings:

...

Adding a comment in the issue generates a new SMTP notification, with immediate delivery, we get a sent mail looking like:

...