Line wrapping issues with Email body template

I am having a lot of difficulties getting consistent formatting results from Workflow generated emails across different email clients. In particular, it seems web-based clients (GMail, Outlook) and especially Outlook for iOS really mangle the paragraphs with weird line breaks and text wrapping. Also, images are inconsistently sized. Outlook on Windows seems to be the truest to the template.

I am using Word body templates and I have followed all recommendations from KB articles here regarding margins, line spacing, extra space before/after paragraphs, page size, etc. I have to create many templates, but I really don’t want to proceed until I come up with a consistent result that I am confident will display correctly (even close would be good enough!)

What are others doing to create professional and consistent results? I am happy to change my method - just need to know what works best before I invest any more time.

Thanks!

1 Like

Make sure you’re only pressing Enter at the end of a paragraph.

1 Like

Yes, I have triple checked that.

Here is my template in Web Layout view with paragraph marks visible so you can see all my CR’s:

For this one, GMail in Chrome actually looks perfect:

Outlook Web (in Chrome) and Outlook on iOS both look like this - notice the incorrect wrap after “Please” and again after “message”:

Outlook 365 on Windows 10 has no line wrapping issues but notice the logo is almost double the size:

I have tried everything – put all text into tables, changed page size & orientation, changed margins, cleared all formatting and started with a brand new template document but there is no apparent rhyme or reason to the undesirable extra
line breaks. Most of my clients will be using Outlook on Windows, so the image resizing is kind of major for me too.

Unfortunately, I have only that one idea. :frowning: I encourage you to contact support@appsheet.com directly to see if that team has any better suggestions.

OK, thanks for the suggestion anyway!

1 Like

Did you try adjusting the table properties? You can set the cell or table to a fixed width.

I’m not sure - I’ll give that a try. You know what’s really interesting - I just noticed that in my reply to @Steve (which I sent from Outlook) the same thing happened when it was posted to this site! Check it out:

Could it be something with the way AppSheet’s SMTP Gateway is handling HTML? Maybe something between AppSheet and Office 365?

@GreenFlux - here is an example where I have put a bunch of text (randomly generated using the MS Word RAND Function) into a fixed-width table. Same result:

Capture

Again, this is specific to Outlook Web and iOS.

Any thoughts on the image getting resized? Honestly I could let this whole thing slide if I could get that pert resolved. Thanks for the help!

Have you tried formatting rules to override the image size?
https://help.appsheet.com/en/articles/2737886-template-image-display

I have not, but I am not pulling this image from a table – it is part of the email body template. Anyway, I think I just figured it out: it seems that the image scaling was being ignored (only by Outlook) so I resized the image to a lower
PPI and that is working across all email clients.

OK, so I have done a great deal more research on the inline image sizing issue and I believe it is because of the way the email body templates are converted to HTML format. Yes, the issue seems to only present in Outlook, but the fix is on AppSheet’s side of the court as far as I can tell. In a nutshell, the issue stems from the way that Outlook handles (or mishandles) DPI scaling. There are two options it seems: 1) insert MS Office specific headers and tags into the HTML or 2) convert inline images to a fixed size in pixels instead of using inches.

Examples of Option 1 abound on the nets by Googling “Outlook dpi scaling”. Here are a few:



Option 2 is just the result of me testing the composition of an email using Gmail. Regardless of the dpi/ppi setting in the source image, Gmail scales it automatically and inserts it into the HTML using a pixel value.

Anybody else running into this?

Hi Jamie,

Thank you for the great research you have done regarding how Outlook handles image scaling.

I took a quick look at the articles you cited. The first article seems especially helpful.
The fixes described in part 1 and 2 of that article seem relatively simple.
I am not sure I fully understand the fix in part 3 and how I can apply that to an arbitrary Google Doc or Word document template which Google Docs and Word have automatically converted to HTML.
May be that will become clearer on further reflection.

1 Like

You’re welcome, Phil – I’m glad you found it helpful! My primary concern is for inline images which are causing me big headaches in Outlook, so I am hoping that Parts 1 and 2 will be enough. Please let me know if you need any more information
from me or if you need me to test anything else. Thanks!

Further question. Have you tried using any other template type for the body instead of a Word file? Perhaps its an error specific to Word.

I have not, but suppose I will need to. While I can somewhat work around the image issue, the text wrapping is now my chief concern. Can’t send out professional looking messages with that situation going on. @Phil do you have any thoughts on that piece of the puzzle? That issue affects Outlook on iOS and HTML5.

@Bahbus - after looking into it, Word is my only practical option. I was hoping maybe I could use PDF or straight HTML as an alternative, but apparently the only other option is a Google Doc and that would require adding a Google Drive data source to my App. My entire App is based on SQL for data and OneDrive for file storage. Adding/managing an additional data source to overcome this bug would be the nuclear option as I see it. I’m hoping AppSheet is going to be able to fix this quickly so I don’t have to go there. Thanks for the suggestion anyway! @Aleksi or @Phil please let me know if you have any other suggestions or ideas. Thanks all!

Well, it was worth looking into. I’m having my own problems with a word template, now, that should be the exact same as one of @Aleksi examples (from a Google Doc) yesterday in a different thread. Mine doesn’t work at all and the workflow throws an error.

Bump. Any progress on this @Phil or @Aleksi? I am still getting totally random and unsightly line breaks in Outlook Web and iOS - all the blue areas below are incorrectly inserted whitespace:

Jamie, could you please send one of these badly-formatted emails to praveen_seshadri@hotmail.com — I can view it on Outlook on the web on on a local Outlook running on Windows 10. Will help get to the bottom of it.

1 Like

Hi! I have had this issue as well. In outlook, it goes like this…

Nick - 2/02/2022 The bread looks baked

In gmail, like this (correct)

Nick - 2/02/2022
The bread looks baked

Also, I had to remove my logo from my email templates because on gmail, they were normal sized, but on outlook, they took up the whole screen like 4 or 5x the original size. I always assumed this was an outlook problem and not appsheet, but was never sure. Thanks!

2 Likes