Email reply formatting

Using Discourse as a ticket/support system for our company.
Everything was super easy to set up so I applaud all the people that came before in order to pave the way.

The only thing I’m finding a little odd is how carriage returns are being handled when going back and forth between e-mail and the web interface.

I created a new ticket via e-mail like so:

This is a semi-final test to make sure that staged user creation works correctly for tickets.

Thanks,
David

And it showed up as a new topic correctly, looking the same.
I replied using the web interface and typed:

This is a reply to test ticket 7. So far so good.

Thanks,
Support

But the e-mail that was received back to the OP looks like:

This is a reply to test ticket 7. So far so good. Thanks, Support

The next reply, from e-mail client to forum went like so:

This is a reply to the reply to test ticket 7.
Confused yet?

Thanks,
David

Posted as:

This is a reply to the reply to test ticket 7.Confused yet?

Thanks,
David

And the final reply was sent from support staff to “customer” via e-mail. Email formatted like so, (and showed up on the topic the same way):

The only thing confusing me is why the formatting gets messed up?

Thanks,
Support

But again was all one line in the e-mail that the customer received.

I need to fix it so it’s consistently adding line breaks where I need them. Sometimes our replies might be several paragraphs long and we’ll need those breaks for readability.

1 Like

Just noticed that bold and italics don’t translate from web to e-mail either.

1 Like

Can anyone confirm this is also happening for them?
Is it just something about my specific setup?

I’m trying to move our company over to Discourse for our tickets and away from what we currently use as I really dislike it, but it does at least keep formatting correct.

Has nobody else dealt with this issue?
Even if you haven’t please let me know so that I can verify that it’s something specific to my setup as opposed to a general Discouse issue.

i think student finance England have this problem, but worse their line breaks are taken out altogether and you get no space

but you can put a bizzarly formatted email on discourse composer and it fixes itself, like magic…

looks like your outbound mail parser likes to remove line breaks

is there a way to force the line breaks to be parsed?

neither deos rendered Math, though the parser deos strip the $ signs

I’ve just done a quick test with a PM to a test user and it looks fine in zohomail:

The PM:

The email:

What email client did you send it to?

I have viewed received messages in Apple Mail, Zoho webmail, and Gmail online.

The server is sending outbound messages with Zoho mail settings.

I sent this from Discourse:

This is what it looks like in Zoho mail and Apple mail:

Just for an extra data point, mine also work fine for this as well:

Alright, this is definitely something with how I’ve set up this site’s email functionality.

I set up another site’s e-mail functionality and everything seems to be working correctly.

I think this is a function of how I’ve had to forward e-mail for the testing of ticketing while our official e-mail address is still in use by our old system.

I’m pretty confident at this point that once I can send e-mail directly it should work.

Thanks for the help!

1 Like

Looks like it’s something else about how the site is set up, I removed the extra forward and all my formatting is still being stripped.

So now I’m back to being at a loss.

Both sites use smtppro.zoho.com based accounts for sending out email.

It’s not possible that a theme component or plugin would affect anything like this would it?

Hmm. :thinking: Not that I can think of. (Which isn’t a hard no :slight_smile:)

You could try checking your site settings with the ‘Only show overridden’ checkbox selected and see if you can spot any differences between the problem site and the working site.

1 Like

Good thought. The only 2 items that I would have thought could possibly affect email that were different was:

  • Forwarded email behavior (create replies on bad) (hidden on good)
  • Manual polling enabled (push emails using the API) on for bad, off for good

I changed them on the bad site and no joy.

I turned off the Topic Card theme component since it modifies the way text looks on the site and is not in use on the working site. No change with that either.

I sent a reply on the site using safe mode and there was no change there either.

Anything different in the email setup outside of Discourse? No ‘send emails as boring old plain text please’ setting on the smtppro.zoho.com side?

I don’t have access to the super admin account for Zoho for my work site.
I’ll take a look at the settings for my own account and see if anything looks like it could make a difference.

I changed the SMTP server in use on the site with the formatting issue to use the same one as the site that’s sending replies with proper formatting.

Still broken.

So there’s definitely an issue with the site itself, but I have no idea where else to look for a fix.

I could really use some more handholding. I’ve got to get this fixed.

I just tested sending a response from another user on the site. Issue remains, so it’s not user based.

What’s the likelihood of the server it’s hosted on having any impact on this issue?

I found the freaking culprit!

I had enabled Post excerpts in emails

The description is

In notification emails, always send excerpts instead of full posts

But that’s not quite correct.

  1. It applies to ALL emails, not just notifications.
  2. An excerpt is a small portion, there is no need to strip formatting just because it’s not the entire message.

In my mind, a reply received via e-mail isn’t a notification, it’s a reply. A notification is, “Hey user X just @mentioned you.”

I’m just glad I can now move forward with out new ticketing system. I hope this helps someone else. And maybe the team can either fix that setting, or at least clarify the description.

2 Likes