<p>Does anyone know of a way to send simple php mail from a twig template?</p>

<p>Something we can use like... {% mail 'Message', entry.userEmail %} or similar.</p>

<p>Would be good to not have to pre-define the content in a plugin.</p>

CC BY-SA 3.0
2015-12-15T20:51:08.753Z
Although not what the user was looking for, take a look at [my answer here](http://craftcms.stackexchange.com/questions/12824/how-can-i-pass-variables-to-emails-template-onbeforesendemail). Is that what you are trying to do? I can provide a better answer here if so...
Damon
<templating><emails><craft-features>
Sending email from twig template
# Sending email from twig template

(Asked by: username_0 on 2015-12-15)

Does anyone know of a way to send simple php mail from a twig template?

Something we can use like... {% mail 'Message', entry.userEmail %} or similar.

Would be good to not have to pre-define the content in a plugin.

**Tags:** templating, emails, craft-features
> **Comments:**
> **username_1**: Although not what the user was looking for, take a look at [my answer here](http://craftcms.stackexchange.com/questions/12824/how-can-i-pass-variables-to-emails-template-onbeforesendemail). Is that what you are trying to do? I can provide a better answer here if so...  

---

## 0 answers

