You are viewing limited content. For full access, please sign in.

Question

Question

Outlook adding line breaks before table

asked on April 29, 2021 Show version history

The issue that I'm running into is that I'm sending an email out with an HTML token that contains an HTML table. No matter what I do, Outlook is adding a ton of line breaks before the table starts. So in my email I have tokens before the table and a few lines of words after the table. After the table, I don't have any line breaks but before the table and after the first tokens there are a ton. I've tried doing a nested table and keeping everything inside HTML but now it's adding line breaks at the beginning of the row that contains the nested table. 

And here is my current code for the HTML nested table I'm using:

<table border="1" width="100%">
<tr>
<td>%(querypaymentreferencerows_VendorName)
%(querypaymentreferencerows_RTStreet)
%(querypaymentreferencerows_RTCity), %(querypaymentreferencerows_RTState) %(querypaymentreferencerows_RTZipCode)</td>
</tr>
<tr>
<td>
<table width="100%" border="1" table-layout="auto">
<tr>
<th valign="bottom" style="text-align:center">Payment Reference</th>
<th valign="bottom" style="text-align:center">Payment Date</th>
<th valign="bottom" style="text-align:center">Griffith Company Name</th>
<th valign="bottom" style="text-align:center">Griffith Vendor Number</th>
<th valign="bottom" style="text-align:center">Invoice#</th>
<th valign="bottom" style="text-align:center">Invoice Date</th>
<th valign="bottom" style="text-align:center">Invoice Currency</th>
<th valign="bottom" style="text-align:center">Invoice Amount</th>
<th valign="bottom" style="text-align:center">Cash Discount</th>
<th valign="bottom" style="text-align:center">Payment Amount</th>
</tr>
<tr>
<td>%(paymentReference#[]#)</td>
<td>%(paymentDate#[]#)</td>
<td>%(griffithCompanyname#[]#)</td>
<td>%(griffithVendorNumber#[]#)</td>
<td>%(invoiceNumber#[]#)</td>
<td>%(invoiceDate#[]#)</td>
<td>%(invoiceCurrency#[]#)</td>
<td style="text-align:right">%(invoiceAmountFormatted#[]#)</td>
<td style="text-align:right">%(cashDiscountFormatted#[]#)</td>
<td style="text-align:right">%(paymentAmountFormatted#[]#)</td>
</tr>
<tr>
<td>Total</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="text-align:right">%(invoiceAmount#@Sum@##"c"#)</td>
<td style="text-align:right">%(cashDiscount#@Sum@##"c"#)</td>
<td style="text-align:right">%(paymentAmount#@Sum@##"c"#)</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>If you have any questions, please contact us at the email below.</td>
</tr>
<tr>
<td>Griffith Foods - Accounts Payable Dept
One Griffith Center, Alsip, IL 60803
test@test.com</td>
</tr>
</table>

EDIT: Just realized that the email is adding line breaks at the beginning of everything as well...

0 0

Answer

SELECTED ANSWER
replied on April 29, 2021 Show version history

Alex,

The workaround for this behavior is to remove all of the white space in your email body.  In essence your html needs to look like one continuous blob of text from start to finish.   See this Answers post https://answers.laserfiche.com/questions/82319/HTML-issues-in-Email-Activity-within-Workflow#98532

0 0
replied on April 29, 2021 Show version history

So what you're saying is that my code in the token should be one continuous line like this; <table><tr><td>insert stuff here</td></tr><tr><td>blahblahblah</td></tr></table> and so on and so forth? This is what my token looks like now.

0 0
replied on April 29, 2021

Yep, remove all of the white space from the email body.  The obvious downside is that it pretty much makes the email body unreadable if you have to troubleshoot it later on...

0 0
replied on April 29, 2021

Thank you so much Chris! I've been banging my head against a wall for a few days trying to figure this out haha. Who would've thought it was this "simple" lol.

0 0
replied on April 30, 2021

Lol!  'Simple' or 'counterintuitive'?  Not sure which is the better description...  wink

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.