Create an email signature macro to be used in notifications

These are the steps to create a signature macro included in the emails JEMHCloud sends as part of issue notifications.

Step-by-step guide

1. Upload your company logo

If your company don't have a CDN server where your images can be accessed, you can upload them into JEMHCloud and then include the images into templates/macros.

  1. Go to Notifications > Images > Create

  2. In the form, set a name (companyLogo) and upload your company's image

  3. After creating the image, the page will look like this:

  4. The Template Script will be used later in the custom macro

2. Create Custom Footer Macro

The custom macro will override a system one (#macro ( jemhIncludeFooter)). This will affect all templates that use the macro (like update, create, delete templates, etc.)

  1. Go To Notifications > Custom Macros > Edit

  2. Write the following macro in the text box and Submit:

    Custom Macro

    #macro ( jemhIncludeFooter) <!-- there needs to be content in the cell for it to render in some clients --> <tr> <td class="email-content-rounded-bottom mobile-expand">&nbsp;</td> </tr> <tr> <td id="footer-pattern"> <table width="100%" id="footer-pattern-container"> <tr> <td width="200" id="footer-pattern-logo-desktop-container"> <img src="$jemhUtils.getImageUrl('companyLogo')" /> </td> <td> <p>John Doe / CEO</p> <p> <a href="#">JohnDoe@RoomToGrow.io</a> / 305-999-9999 </p> <p>Room To Grow</p> <p> <a href="#">http://RoomToGrow.io</a> <p style="font-family: Helvetica, Arial, sans-serif; font-size: 10px; line-height: 12px;"> <a href="#" style="display: inline;"> <img width="16" height="16" data-filename="facebook.png" src="https://s3.amazonaws.com/htmlsig-assets/round/facebook.png" alt="Facebook"> </a> <a href="#" style="display: inline;"> <img width="16" height="16" data-filename="twitter.png" src="https://s3.amazonaws.com/htmlsig-assets/round/twitter.png" alt="Twitter"> </a> <a href="#" style="display: inline;"> <img width="16" height="16" data-filename="googleplus.png" src="https://s3.amazonaws.com/htmlsig-assets/round/googleplus.png" alt="Google Plus"> </a> <a href="#" style="display: inline;"> <img width="16" height="16" data-filename="linkedin.png" src="https://s3.amazonaws.com/htmlsig-assets/round/linkedin.png" alt="Linkedin"> </a> </p> </td> </tr> </table> </td> </tr> #end
  3. The macro has references to the image (companyLogo) stored via JEMHCloud that are made available through the JEMHC Content Delivery Network

  4. The page should look like:

3. Preview Macro

The editor also has a preview feature, so you can preview how the system macro will render:

  1. Select any Preview Context

  2. Select your theme (css), either a system one or a custom

  3. Enter #jemhIncludeFooter() in Scratchpad 

    1. Press the preview icon and html. Preview should be:

4. Preview Template Set

Another way to test how the full email looks with the new macro is:

  1. Go to Notification -> Preview

  2. Select any issue template set of either JIRA or Generic Theme.

  3. Preview 

 

5. Integration Test

Be sure you have Issue Notification Mapping configured (Notification Schemes and JEMHC)

  1. Create an issue in JIRA for the project configured in the Issue Notification Mapping

  2. Go to Auditing > Events. After a few minutes, the event should cause an email to be sent to you (the reporter) with the new signature.  For example:

Its also possible to override different macros customizing sections on your emails. All the macros can be seen in Notifications -> System Macros

For full customization, you can create your own custom templates and themes copying them from the the system ones. Beware that future maintenance will be harder as templates need to be manually merged when new releases change system templates.

Related articles