Customize Invite email message

AI-generated summary

techAPJ announced a new feature allowing users to customize invite email messages for forums, topics, or direct messages. However, jomaxro raised a concern that the system silently ignores custom messages if the {invite_link} placeholder is missing, suggesting the user should be alerted instead. techAPJ acknowledged this, and codinghorror proposed preventing the send action entirely if the link is absent. sam argued that requiring template syntax is too technical, suggesting a dedicated “custom message” text box instead. codinghorror supported this, proposing a plain text field that automatically inserts the content into the {user_custom_message} template. fefrei noted this approach is also safer against spam. techAPJ implemented these changes via a GitHub commit. Subsequently, riking suggested refining the default trust message to clarify that an account is created automatically, a change codinghorror accepted. Finally, almereyda reported that invite emails currently arrive from an unnamed sender and requested using the forum title as the default From: address.

You can now customize Invite email message when inviting user to forum, topic or message.

The resulting invite email will look like:

10 curtidas

This worries me. If Discourse is checking for the link before sending, why not alert the user that they must include the link, instead of silently ignoring the message?

4 curtidas

Good point! Added on my list. :pencil:

2 curtidas

Agreed – or just prevent the button from being pressed, if that key string is not present in the text? That might be simpler.

3 curtidas

My concern here is that people don’t understand templates.

Instead why not simply give them a dedicated spot in the invite for a “custom message” and then allow them to add it in here.

It just feels a little bit too flexible and “technical” this way to me.

4 curtidas

Sure, I support that – @techapj can you change it so

  1. When “custom message” is expanded, a textbox with some suggested copy is shown. No template, just plain text:

    Hey, I thought you might enjoy this topic!

  2. If user enters text, that is inserted into the template on their behalf in the {user_custom_message} template field or what have you.

7 curtidas

Note that this is also safer – with the current design, the sender could totally subvert the message, maybe even use it for spamming.

3 curtidas

Okay, done via:

https://github.com/discourse/discourse/commit/40e9e1be6642b1faa91c0f8c0aaec8f7cd5dfab5

Updated the OP to reflect the same.

5 curtidas

hmm, this message could be better:

FEATURE: user-friendly custom message · discourse/discourse@40e9e1b · GitHub

This invitation is from a trusted user, so you won’t need to log in.

How about something like this:

This invitation is from a trusted user, so an account will be created for you automatically.

You’ll get another email with instructions on how to sign in next time.

4 curtidas

Sure, I think that suffices; no need to add another extra line.

It just happened the invite notification does not arrive from a named From: address, which is even considered invalid:

Would it be a considerable, sane default to present the title as the sender of the invitation emails?