HTML template correspondence

Hi,

I’m receiving requests from users if it is possible to have RT
correspond in HTML enabled mail messages instead of plain text. Is this
possible with RT? The idea is that they eventually would like to be able
to use the company logo in the mail.

Kind regards,

Ton Hoogstraten

Hi,

I’m receiving requests from users if it is possible to have RT
correspond in HTML enabled mail messages instead of plain text. Is
this possible with RT? The idea is that they eventually would like
to be able to use the company logo in the mail.

As it happens, yes. RT 3.8 makes this possible :slight_smile:

Hi Jesse,

I have a test conversion of our production setup running. I’m not
getting the responses in HTML if I type a message in richt text in the
editor. Am I missing a specific setting that needs to be enabled?

Thank you,

TonFrom: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: maandag 15 september 2008 15:52
To: Hoogstraten, Ton
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTML template correspondence

Hi,

I’m receiving requests from users if it is possible to have RT
correspond in HTML enabled mail messages instead of plain text. Is this
possible with RT? The idea is that they eventually would like to be able
to use the company logo in the mail.

As it happens, yes. RT 3.8 makes this possible :slight_smile:

Jesse, was this fixed in 3.8.1? In 3.8.0, RT was stripping the tags
produced by the new editor. Perhaps this is a separate issue.

James Moseley

         Jesse Vincent                                                 
         <jesse@bestpracti                                             
         cal.com>                                                   To 
         Sent by:                  "Hoogstraten, Ton"                  
         rt-users-bounces@         <Ton.Hoogstraten@ingram.nl>         
         lists.bestpractic                                          cc 
         al.com                    rt-users@lists.bestpractical.com    
                                                               Subject 
                                   Re: [rt-users] HTML template        
         09/15/2008 08:51          correspondence                      
         AMOn Sep 15, 2008, at 9:48 AM, Hoogstraten, Ton wrote:

  Hi,

  I’m receiving requests from users if it is possible to have RT
  correspond in HTML enabled mail messages instead of plain text.  Is
  this possible with RT? The idea is that they eventually would like to
  be able to use the company logo in the mail.

As it happens, yes. RT 3.8 makes this possible :slight_smile:
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

There are still some wrinkles getting ironed out

Carbon60: Cloud Consulting - Services and Solutions rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of
Hoogstraten, Ton
Sent: Monday, September 15, 2008 9:56 AM
To: Jesse Vincent
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTML template correspondence

Hi Jesse,

I have a test conversion of our production setup running. I’m not
getting the responses in HTML if I type a message in richt text in the
editor. Am I missing a specific setting that needs to be enabled?

Thank you,

Ton

From: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: maandag 15 september 2008 15:52
To: Hoogstraten, Ton
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTML template correspondence

Hi,

I’m receiving requests from users if it is possible to have RT
correspond in HTML enabled mail messages instead of plain text. Is this
possible with RT? The idea is that they eventually would like to be able
to use the company logo in the mail.

As it happens, yes. RT 3.8 makes this possible :slight_smile:

Jesse, was this fixed in 3.8.1? In 3.8.0, RT was stripping the tags
produced by the new editor. Perhaps this is a separate issue.

RT was stripping some of the tags, but only on display within RT,
not when it was sending the mail, as far as I know.

Hi Jesse,

I have a test conversion of our production setup running. I’m not
getting the responses in HTML if I type a message in richt text in
the editor. Am I missing a specific setting that needs to be enabled?

It’s worth having a look at the message another user replied with.
There are still some nits. There may be a patch sitting in our RT that
you’ll want to apply.

-jesse

Jesse,

I’m not sure if the following should be reported as a bug in rt 3.8.1.
In my search for HTML response in correspondence messages I tried the
following that resulted in a stack trace.

My Perl skills are limited, so I might not see/do this correct. I tried
setting the ‘Content-Type: text/html’ in the Correspondence template.
I’m basing this idea on the following code in /lib/RT/Action/SendMail.pm
that should allow you to parse ‘text/html’ to $type.

For security reasons, we only send out textual mails.

foreach my $part ( grep !$_->is_multipart, $MIMEObj->parts_DFS ) {

    my $type = $part->mime_type || 'text/plain';

    $type = 'text/plain' unless

RT::I18N::IsTextualContentType($type);

    $part->head->mime_attr( "Content-Type"         => $type );

    $part->head->mime_attr( "Content-Type.charset" => 'utf-8' );

If I then check the IsTextualContentType function:

sub IsTextualContentType {

my $type = shift;

($type =~ m{^(?:text/(?:plain|html)|message/rfc822)\b}i) ? 1 : 0;

}

It should be able to return true on ContentType ‘text/html’. RT however
generates a stack strace when opening Update.html and is not sending the
mail when submitted. If I remove the ‘ContentType: text/html’ line from
the Template all is ok and the system works normally again. See included
attachment for the stack trace

Regards,

TonFrom: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: maandag 15 september 2008 17:00
To: Hoogstraten, Ton
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTML template correspondence

Hi Jesse,

I have a test conversion of our production setup running. I’m not
getting the responses in HTML if I type a message in richt text in the
editor. Am I missing a specific setting that needs to be enabled?

It’s worth having a look at the message another user replied with. There
are still some nits. There may be a patch sitting in our RT that you’ll
want to apply.

-jesse

Thank you,

Ton

From: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: maandag 15 september 2008 15:52
To: Hoogstraten, Ton
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] HTML template correspondence

Hi,

I’m receiving requests from users if it is possible to have RT
correspond in HTML enabled mail messages instead of plain text. Is this
possible with RT? The idea is that they eventually would like to be able
to use the company logo in the mail.

As it happens, yes. RT 3.8 makes this possible :slight_smile:

rt.stack (2.5 KB)