Page 1 of 1

CGBF Sending a html table

Posted: Thu May 03, 2018 7:28 pm
by HarmO
Hi, i made a simple chopping cart and want to send the order with CGBF, but all the HTML table tags gets striped out.

Code: Select all

<table callspacing="0" cellpadding="5" border="1">
		<tbody><tr bgcolor="#999999">
			<th>Product</th>
			<th>aantal</th>
			<th>Prijs</th>
		</tr>
				<tr>
			<td>
				Broodje Americain (Wit)							</td>
			<td>2</td>
			<td>€5,20</td>
		</tr>
				<tr>
			<td>
				Broodje Gehakt (Wit)							</td>
			<td>1</td>
			<td>€2,60</td>
		</tr>
				<tr>
			<td>
				Broodje Kaas (Bruin)							</td>
			<td>1</td>
			<td>€3,10</td>
		</tr>
		
		<tr bgcolor="#DDDDDD">
			<td colspan="2"><b>Totaal</b></td>
			<td><b>€ 10,9</b></td>
		</tr>
	</tbody></table>
First i loaded the table in a hidden textfield called order.
Since that didn't work i generate the HTML in my e-mail template itself, but still the tags get filtered out.

any suggestions?

Re: CGBF Sending a html table

Posted: Fri May 04, 2018 10:40 am
by rotezecke
have you tried {literal}{/literal} ?

Re: CGBF Sending a html table

Posted: Fri May 04, 2018 12:37 pm
by calguy1000
I have sent tables in emails with CGBF. And verified the code. CGBF does not strip any HTML out of the various body templates.

Email subjects cannot contain HTML structure and therefore they are stripped of tags.

I suggest you look at the raw output of the email to see if it is your email client that may be messing with things.

Re: CGBF Sending a html table

Posted: Wed May 09, 2018 7:37 am
by HarmO
Hi thanks for the feedback.

I don't see why i should use {literal} since it is just HTML and some variables.

I could send html tables before but not anymore.
I did do a update of CGBF in the meanwhile (not saying it is the module, just want to give you all the info), modified the table (added bg-colors) and send over "SMTP" instead of by "mail".

Clearly we can't place html in the subject.
if i checked the e-mail source code, the table was striped out of the body so it is not Thunderbird that is messing up.

Since the urgency of the project and that i was unable to solve it with html tables, i solved it by creating a nice ASCII table and this comes true.