Unable to customize HTML of user notification emails

(Joshua Rosenfeld) #1

How long should it take for an email template to be used for an email? For our internal site we’re looking to remove some of the extra stuff from the emails. I’ve been playing with the customization for user_posted, but the emails haven’t changed.

Here’s the current template, but the test email generated from a new topic still looks like normal:

Edit: Just for context, that’s not the template we plan on using, just trying to test why the changes weren’t going through…

Editing email templates is not working
Very secret info and email notifications
(Jeff Atwood) #2

Not sure, any advice here @neil?

(Neil Lalonde) #3

For some reason, those notification emails can’t be customized. The template you’re editing is only for the text-only part of the email. The html part is not customizable. Other emails with this limitation are user_quoted, user_linked, user_mentioned, user_private_message, and all others like that.

(Joshua Rosenfeld) #4

Oh :disappointed:…is there a way to strip out all the HTML? We’re using the forum as a ticket submission system, where users (Help Desk consultants) enter tickets into topics that are emailed to the corresponding department, but we’re getting complaints that the HTML in the email is a pain when they just want the raw text of the ticket. Any suggestions?

(Neil Lalonde) #5

I fixed the user notifications email so they would use customizations in the html part of the emails too. The body of your customization will be passed through the markdown parser to generate the html, as usual.

The emails are always multipart, so can the ticket system look at the text part instead? That has the raw text (well, markdown).

(Joshua Rosenfeld) #6

@neil the issue was that the “ticket system” is Discourse - the techs simply receive emails (they don’t “use” Discourse). They simply want to receive the body of the “ticket” (post content), and not the rest (header, username and info, footer, etc.).

P.S. I no longer work where this issue originated - I’ll reach out to my former colleagues and see if this change helps.

(Aman Jagga) #7

great !! Even I was facing the same issue from long time! In which version of Discourse this fix is available?

(Neil Lalonde) #8

@Aman_Jagga Should be in 1.8.0.beta8 and later (March 20).