Changing email template used in post request


(Jesper Enemark) #1

I am using a post request to invite users to a group
image

My problem is that this request sends an email with the wrong template. At the current moment the template of which the email uses is:
image

What I want to use is the custom message version called:
image

How do I change the template that is used when I do my mailing POST Request?


(Jesper Enemark) #2

When I put the key “user_custom_message” into the current template it gives me this error -
image


(Edwin Mhoy Silva) #3

The email Template automatically changes, when you add a custom message to your invite request.
The reason for your request not sending a custom message, is that you may already have send an invite to that specific Email. Discourse automatically just resend the first invite made to a Email, when the user has already been invited :slight_smile: