Sent emails all text formatted into one line

I’ve been using Manager for a few years, very intermittently I might add, and have never see this issue before.
I just sent an invoice and all text was formatted into one line with wrap around.
So I upgraded to the latest version (from 19… to 20.2.63) and still the same.
Changed email setting from HTML to plain text and emails sent are now formatted correctly, but wondering if this is a bug, or something else.

Thanks

Could you share the html file? It is possible you are wrapping <div> or <p> around the text which will make it behave like a paragraph and ignore line breaks.

Are you saying the text of the email accompanying the invoice was formatted in one line? Or was the text of the invoice itself formatted that way?

If you are referring to text in the email, and had HTML option set, the message created from an email template is treated like regular HTML code and must be formatted as such.

It’s not a bug. HTML requires <br> tag to force new line. That’s why switching from HTML to plain text has solved your problem.

To be clear, the invoice is automatically sent as a pdf attachment from Manager. This is fine. All the text of the email is sent as just one line of text with spaces. Obviously something had changed as this has not happened before.

When I send an invoice I send via built in email and my hosted mail provider. The template is prefilled and I add some personalisation before sending.

I just edited my email template with
at the end of each line and you are right, when sent as html I now have line breaks.

For the average Joe, could this info be added to the guides? Or at least recommendation to always send using plain text unless you know what you are doing! Not being a coder myself I’ll stick to sending as plain text. May be an update changed my default from plain text to html??

Thanks for the response and the great work.

Actually, @jabberwokky, the necessary information about templates is already present at https://www.manager.io/guides/10392. There are two factors at play:

  1. The email template itself, which is written in the Liquid templating language. Changing your email settings does not affect this, but alters the output of the process. In other words, the Liquid template generates the message, but does not control how it is sent.
  2. Your email settings, which control the format of the message sent. If set as HTML, the output from the template will be converted to HTML, relying on the coding within the Liquid template. If set as plain text, a different message is generated. You have less control over the presentation of the plain-text message.

Your issue may have been generated by your update, depending on just older version you were using, because Email Settings have evolved over the past year. Or, it is possible your previous messages were short enough that differences between HTML and plain text were not noticeable.