Outgoing HTML mail part 2

Hi all,

I’m currently working on e-mailtemplates to make our outgoing mail to be sent in HTML. I want to be able to set a certain font, fontsize and use a logo in the signature. So far everything works just the way I want it, except for one thing. When a message is received in Microsoft Outlook, it breaks down my styles. It reverts the font back to Times New Roman, and it also doesn’t seem to care about fontsizes (although I’m not very sure about that yet). This is the template I’m currently using:

RT-Attach-Message: yes
Content-Type: text/html

                                           {$Transaction->Content(Type => 'text/html')}




Met vriendelijke groet,


Raymond

I’ve been searching the interwebs a lot on this issue, and I’m glad to see I’m not the only one experiencing this issue. Some say you have to add the style information in the

-tags on every line of text (which is not really the solution I’m looking for), or you need to put the code posted below in the code of the e-mail:

The problem there is that if I put this code in my template, just above the Transaction content, RT is saying this: “Couldn’t compile template codeblock ‘font-family: Verdana, Geneva, sans-serif !important;’: syntax error at template line 7”

Is there an easy way to fix this?

Thanks!

Raymond

Hi,

you must add a blank line after the “Content-Type” line to separate
headers from body.

See also
https://docs.bestpractical.com/rt/4.4.1/customizing/templates.html#Templates

Chris

Hi Chris,

Thanks, i’ve tried it, but it doesn’t seem to fix the issue for me.

Couldn’t compile template codeblock ‘font-family: Verdana, Geneva, sans-serif !important;’: syntax error at template line 9

Raymond

-----Oorspronkelijk bericht-----
Van: Christian Loos [mailto:cloos@netcologne.de]
Verzonden: vrijdag 9 september 2016 13:18
Aan: Teunissen, Raymond; rt-users@lists.bestpractical.com
Onderwerp: Re: Outgoing HTML mail part 2

Hi,

you must add a blank line after the “Content-Type” line to separate headers from body.

See also
https://docs.bestpractical.com/rt/4.4.1/customizing/templates.html#Templates

Chris

Sorry, I missed that you must also escape the braces, see
Text::Template - Expand template text with embedded Perl - metacpan.org.

You have to change

body, table, td {font-family: Verdana, Geneva, sans-serif !important;}

to

body, table, td {font-family: Verdana, Geneva, sans-serif !important;}

ChrisAm 09.09.2016 um 13:24 schrieb raymond.teunissen@kpn.com:

Hi Chris,

Thanks, i’ve tried it, but it doesn’t seem to fix the issue for me.

Couldn’t compile template codeblock ‘font-family: Verdana, Geneva, sans-serif !important;’: syntax error at template line 9

Raymond

-----Oorspronkelijk bericht-----
Van: Christian Loos [mailto:cloos@netcologne.de]
Verzonden: vrijdag 9 september 2016 13:18
Aan: Teunissen, Raymond; rt-users@lists.bestpractical.com
Onderwerp: Re: Outgoing HTML mail part 2

Hi,

you must add a blank line after the “Content-Type” line to separate headers from body.

See also
Customizing/Templates - RT 4.4.1 Documentation - Best Practical

Chris

RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training

  • Boston - October 24-26
  • Los Angeles - Q1 2017

Chris,

Thanks! That did the trick.

Regards,
Raymond

-----Oorspronkelijk bericht-----
Van: Christian Loos [mailto:cloos@netcologne.de]
Verzonden: vrijdag 9 september 2016 13:40
Aan: Teunissen, Raymond; rt-users@lists.bestpractical.com
Onderwerp: Re: Outgoing HTML mail part 2

Sorry, I missed that you must also escape the braces, see Text::Template - Expand template text with embedded Perl - metacpan.org.

You have to change

body, table, td {font-family: Verdana, Geneva, sans-serif !important;}

to

body, table, td {font-family: Verdana, Geneva, sans-serif !important;}

ChrisAm 09.09.2016 um 13:24 schrieb raymond.teunissen@kpn.com:

Hi Chris,

Thanks, i’ve tried it, but it doesn’t seem to fix the issue for me.

Couldn’t compile template codeblock ‘font-family: Verdana, Geneva,
sans-serif !important;’: syntax error at template line 9

Raymond

-----Oorspronkelijk bericht-----
Van: Christian Loos [mailto:cloos@netcologne.de]
Verzonden: vrijdag 9 september 2016 13:18
Aan: Teunissen, Raymond; rt-users@lists.bestpractical.com
Onderwerp: Re: Outgoing HTML mail part 2

Hi,

you must add a blank line after the “Content-Type” line to separate headers from body.

See also
Customizing/Templates - RT 4.4.1 Documentation - Best Practical
plates

Chris

RT 4.4 and RTIR training sessions, and a new workshop day!
https://bestpractical.com/training

  • Boston - October 24-26
  • Los Angeles - Q1 2017