Email generated ticket display problems using Wordpress Gravity Forms

Hi all,

I have a peculiar problem. Our RT system 4.4.0 is not displaying or rendering newly created tickets via email that is being generated via Wordpress Gravity Forms plugins in proper formatting. The Gravity Forms has an inbuilt option to send the form submission to an email. In this case, when I am putting the RT system email, the formatting in the RT system is in a single line unless the submission contains a new line character. Interestingly, the email submission is being properly formatted (in a table) in my email client. I am not sure why this is the case.

I am new to RT. To me this seems like a rendering issue that is either tied to the site config or a setting in the interface.

Please help me fix this minor bug so the form submissions could be rendered properly in RT.

Please see the screenshot below for both views.

The screen shot displayed is what you see on the ticket display page under history?

yes, it’s under the history tab. I cannot figure how to change rendering options if that’s the case.

Are you able to send a snippet of the email source content? if you click the “Download” link next to the transaction you can see the source of the email. In this case, I am curious what the HTML looks like

here you go. It looks like it’s rendering as a Table.

If you paste the snippet I will try creating a ticket on my RT

Submitted values are:


Name
  John Doe
Email
  johndoe@gmial.com
What are your hobbies?
  Tango
What professional experience do you have?
  akjskldja sjda
sdashjkd asd
a
a
sdjhaj shd jahsld lakjsdklja klsjd

new line

ahshdlaksdkl
<br>
line break


 

Unable to paste the code snippet for some reason. How do I do it properly without it being rendered?

You can indent the block with four spaces or wrap it in ``` or there is the ‘pre formatted text’ style option

Submitted values are:<br />
<br />
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA"><tr><td>
                            <table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
                            <tr bgcolor="#EAF2FA">
		                                    <td colspan="2">
		                                        <font style="font-family: sans-serif; font-size:12px;"><strong>Name</strong></font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#FFFFFF">
		                                    <td width="20">&nbsp;</td>
		                                    <td>
		                                        <font style="font-family: sans-serif; font-size:12px;">John Doe</font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#EAF2FA">
		                                    <td colspan="2">
		                                        <font style="font-family: sans-serif; font-size:12px;"><strong>Email</strong></font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#FFFFFF">
		                                    <td width="20">&nbsp;</td>
		                                    <td>
		                                        <font style="font-family: sans-serif; font-size:12px;"><a href='mailto:johndoe@gmial.com'>johndoe@gmial.com</a></font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#EAF2FA">
		                                    <td colspan="2">
		                                        <font style="font-family: sans-serif; font-size:12px;"><strong>What are your hobbies?</strong></font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#FFFFFF">
		                                    <td width="20">&nbsp;</td>
		                                    <td>
		                                        <font style="font-family: sans-serif; font-size:12px;">Tango</font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#EAF2FA">
		                                    <td colspan="2">
		                                        <font style="font-family: sans-serif; font-size:12px;"><strong>What professional experience do you have?</strong></font>
		                                    </td>
		                               </tr>
		                               <tr bgcolor="#FFFFFF">
		                                    <td width="20">&nbsp;</td>
		                                    <td>
		                                        <font style="font-family: sans-serif; font-size:12px;">akjskldja sjda<br />
sdashjkd asd<br />
a<br />
a<br />
sdjhaj shd jahsld lakjsdklja klsjd <br />
<br />
new line<br />
<br />
ahshdlaksdkl<br />
&lt;br&gt;<br />
line break</font>
		                                    </td>
		                               </tr>
		                               </table>
                        </td>
                   </tr>
               </table><br />
<br />
&nbsp;<br />
<br />

See this post: RT eats table-tags in html-emails

By default RT scrubs HTML attributes that are not explicitly aloud for security reasons, documenation is here: https://docs.bestpractical.com/rt/4.4.4/RT/Interface/Web.html#NewScrubber

In your Web_Local.pm callback I think you can get started with this as the content:

package HTML::Mason::Commands;
# Let tables through
push @SCRUBBER_ALLOWED_TAGS, qw(TABLE THEAD TBODY TFOOT TR TD TH);
$SCRUBBER_ALLOWED_ATTRIBUTES{bgcolor} = '^\s*#[a-fA-F0-9]{3,6}\s*';
1;

Thanks. I will try. So for this I need server access? Is there a way to do this via the admin interface?

Yes, you need server access to create the new file and you will also want to clear the mason cache and restart your web server

thanks. it seems like there are two options as per RT eats table-tags in html-emails

  1. install HTML::Gumbo module or
  2. push some settings by creating the new file as you suggest

Are these correct instructions for installing module? https://docs.bestpractical.com/rt/4.2.12/extensions.html

I will first try installing the module.

HTML::Gumbo can be installed using cpan it isn’t an RT extension

1 Like

I would try creating the Web_Local.pm file first you may already have that module installed

1 Like