# Changing email template used in post request

**URL:** https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759
**Category:** Support
**Created:** [26 november 2018 om 10:24 UTC](https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759 "2018-11-26T10:24:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jesper\_Enemark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesper_enemark/32/111051_2.png) [@Jesper\_Enemark](https://meta.discourse.org/u/Jesper_Enemark)
#### Post date: [26 november 2018 om 10:24 UTC](https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759/1 "2018-11-26T10:24:52Z")

</div>

I am using a post request to invite users to a group  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/3/23491158d1fb0a508ef3ef98f49a34a9c26f98c0.png)

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](https://global.discourse-cdn.com/meta/original/3X/7/8/78fefdd0faf6a2cbf247d6d40cde443559e75a71.png)

What I want to use is the custom message version called:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/e/2e0254bedc7ab72f5a3b1b0265b800b2c56e0f69.png)

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

---

<div class="post-metadata">

### Author: ![Jesper\_Enemark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesper_enemark/32/111051_2.png) [@Jesper\_Enemark](https://meta.discourse.org/u/Jesper_Enemark)
#### Post date: [26 november 2018 om 11:12 UTC](https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759/2 "2018-11-26T11:12:39Z")

</div>

When I put the key “user\_custom\_message” into the current template it gives me this error -

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/0/0049dc94119d89a1a2036fa56e106bb8e9583683.png)

---

<div class="post-metadata">

### Author: ![Edwin\_Mhoy\_Silva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/edwin_mhoy_silva/32/109980_2.png) [@Edwin\_Mhoy\_Silva](https://meta.discourse.org/u/Edwin_Mhoy_Silva)
#### Post date: [26 november 2018 om 11:56 UTC](https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759/3 "2018-11-26T11:56:09Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [26 december 2018 om 11:56 UTC](https://meta.discourse.org/t/changing-email-template-used-in-post-request/102759/4 "2018-12-26T11:56:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
