An email notification with some formatting applied does not format properly, because at some stage <div></div> are inserted when the contents consists of multiple lines. The <div> tag is used instead of <br> tags for line breaks within the email body.

Steps to Reproduce

  1. In the appropriate email notification (for example, Incident "opened for me") add the following line:
    <p style="font-family:Arial, Helvetica, Sans-serif; font-size:0.9em; padding-left:5px; padding-bottom:10px; color:red;">${description}</p>
  2. In the ticket, check that the field Description is visible and add a few lines of text to the description.
  3. In the Mail Outbox or Sent, check the result - it will be similar to the following:
    <div><p style="font-family:Arial, Helvetica, Sans-serif; font-size:0.9em; padding-left:5px; padding-bottom:10px;color:red;">Create a multiline</div><div>description</div><div>Divs will be added</div><div>formatting will be lost</p></div><div>&nbsp;</div><div style='display:inline'>Ref:MSG0000038</div>
  4. When the email is received, the formatting is not as required. The css style is only applied to the first line. In addition, the HTML has become invalid because of the way the </div><div>'s are inserted. 



Add an extra <div> and </div> to locations in the template where line breaks (may) occur.

For example:

<div style="padding-bottom:10px; color:red;">
sample text

In a template will be set out as:

<div style="padding-bottom:10px; color:red;">
</div><div>sample text

This is valid HTML, but the formatting will not be correct and the CSS will not be applied. With the extra <div>'s, the correct formatting is applied:

A fixed example:

<div style="padding-bottom:10px; color:red;"><div>
sample text

In a template will be sent out as:

<div style="padding-bottom:10px; color:red;"><div>
</div><div>sample text

Related Problem: PRB583977

Seen In

Aspen Patch 2
Aspen Patch 6
Berlin Patch 5 Hot Fix 2
Berlin Patch 7
Berlin Patch 8
Berlin Patch 8 Hot Fix 1
Calgary Patch 2
Calgary Patch 2 Hot Fix 5
Calgary Patch 4
Dublin EA 8
Eureka Patch 5
Eureka Patch 7 Hot Fix 4

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2015-11-30 15:22:26