Changing the from: address used (statically or from a Custom Field)



You might want to have a different sender email address for each type of issue type e.g. bugs would come from bugs-project-one@email.com, and tasks would come from tasks-project-one@email.com. In the following example we're going to utilise the value set by a Custom Field Defaults configuration to change the sender address used in an outbound notification. This presumes that you're familiar with how to configure a Custom Field Configuration (if not, this page will teach you how - Custom Field Defaults).

What can go wrong

When mail is sent through a mailbox account (eg mailbox@email.com) the from: address will be the default for the mailbox. If you use this feature to change the From: address of the email, your sending mailbox account must be authorized to send mail from that address, its doesn’t simply ‘just work’. Different mailservers react to invalid from: addresses differently, eg:

  • If Google mailboxes are passed a message with an invalid from: address, it will default to the mailbox default, mail gets delivered

  • If O365 mailboxes are passed a message with an invalid from: address, it will fail to be sent, period.

Validation

So, your mail server will validate all mail sent through, that being the case, when you set a custom Sender Email Address address in JEMHC you are responsible for validating the addresses are usable! This becomes ever more important if you use the “Sender Email Address Custom Field”. We will not try to diagnose mail send failures when custom From: addresses are used, because the root cause will be a lack of authorization, which is mail-server specific and out of scope for our support, it is something you need to take up with your mail service provider.

Using a custom field to set the From: address

  • A custom field exists for all the issues within your project. It will contain the sender email address.

  • A Custom Field Default exists for your project. This results in all issues that are created from inbound emails by JEMHC having a value for the custom field.

  • The Custom Field Default is different for each issue type, e.g. tasks are tasks-project-one@email.com and bugs-project-one@email.com

How to configure the email Notification Mapping

Once the items in the preamble are out of the way it's really easy to vary the sender email address between issue types. All you have to do is go into your email notification mapping and find the field called 'Sender Email Address Custom Field' under the 'Sender' section. Here's a picture of it configured to look inside a custom field called 'Custom Field'.

When this field is populated the email notification mapping will use its value as the sender address when sending out email notifications. If the custom field is left blank on the Jira ticket then the sender address within the Message Outbound configuration will be used instead. You can find this by going to Messaging → Outbound → Message Outbounds.