Home Action Log Notify

[BUG] - HTML formated email template with CSS style in HEAD

Vladimir_RemenarVladimir_Remenar Customer IT Monkey ✭
Email sending fails with error "Getting or formatting the HTML notification template failed with error: Input string was not in a correct format." if there is a <style> section in HTML formated template. 

Example:
"<style>
* {line-height: 1.6em;margin: 0;padding: 0;}
body {background-color: #FFFFFF;}
a {color: #348eda;}
table {border-collapse:collapse;border:none;}
.td {border:solid windowtext 1.0pt;padding:0;}
.padding {padding: 10px 0;}
table.body-wrap {padding: 5px;width: 100%;}
table.body-wrap .container {border: 1px solid #f0f0f0;}
table.footer-wrap {clear: both !important;width: 100%; }
.footer-wrap .container p {color: #666666;font-size: 12px; }
table.footer-wrap a {color: #999999;}
h1, h2, h3 {color: #FFFFFF;line-height: 1.2em;margin: 5px 0 5px;}
h1 {font-size: 28px;}
h2 {font-size: 24px;}
h3 {font-size: 20px;}
.container {clear: both !important;display: block !important;Margin: 0 auto !important;}
.body-wrap .container {padding: 20px;}
.content {display: block;margin: 0 auto;}
.content table {width: 100%;}
</style>"

It works as expected when this section is removed. I believe that { } chars confuse Action log notify component :)

Comments

  • Nick_FlintNick_Flint Customer Advanced IT Monkey ✭✭✭
    Thanks for posting this. I moved the css to an external file and linked it in and it worked fine.
  • Dean_RigelsfordDean_Rigelsford Customer IT Monkey ✭
    We tried this in our environment, the linking of the external CSS worked when the notification is opened up through the browser, or through Outlook Web Access, but within the Outlook 2013 client it shifts everything to the far right of the email body! *banging head on desk*
  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    @Dean_Rigelsford
    Yeah, Outlook is notorious for messing with HTML. It disregards standards, adds own styles and a lot of other weird stuff. Litmus is great for testing your HTML templates on many different clients at once.
This discussion has been closed.