<p>Is it possible to setup messages (for transactional emails) as global text fields that include variables such as {{ firstName }}, {{ lastName }}, {{ email }} etc.?</p>

<p>For example:</p>

<ul>
<li>Custom plugin fires off transactional email</li>
<li>Email copy is pulled from global text field</li>
<li>Variables like {{ firstName }} are substituted from plugin action</li>
<li>Email is sent</li>
</ul>

CC BY-SA 3.0
2016-11-30T20:46:27.827Z
I'm probably mis-understanding something, but a plugin has access to all custom fields/globals and would be able to compose the email with whatever content is needs.
Brad Bell
CC BY-SA 3.0
2016-11-30T22:13:18.707Z
@BradBell just looking for a way to make the emails customizable by an admin via a text field. For example someone could change Dear {{ firstName }}, click here to sign up to Dear {{ fistName }}, thanks for signing up.
Adam McCombs
CC BY-SA 3.0
2016-11-30T22:15:54.917Z
Actually @BradBell I just ran across messages under email settings. Is there a way to extend that functionality?
Adam McCombs
<plugin-development><emails><globals>
Custom Messages including variables in global field?
# Custom Messages including variables in global field?

(Asked by: username_0 on 2016-11-30)

Is it possible to setup messages (for transactional emails) as global text fields that include variables such as {{ firstName }}, {{ lastName }}, {{ email }} etc.?

For example:

* Custom plugin fires off transactional email
* Email copy is pulled from global text field
* Variables like {{ firstName }} are substituted from plugin action
* Email is sent

**Tags:** plugin-development, emails, globals

> **Comments:**
> **username_1**: I'm probably mis-understanding something, but a plugin has access to all custom fields/globals and would be able to compose the email with whatever content is needs.  
> **username_0**: @BradBell just looking for a way to make the emails customizable by an admin via a text field. For example someone could change Dear {{ firstName }}, click here to sign up to Dear {{ fistName }}, thanks for signing up.  
> **username_0**: Actually @BradBell I just ran across messages under email settings. Is there a way to extend that functionality?  

---

## 0 answers

