0

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.

1
  • Although not what the user was looking for, take a look at my answer here. Is that what you are trying to do? I can provide a better answer here if so...
    – Damon
    Dec 15, 2015 at 20:51

1 Answer 1

1

You could create a simple plugin with just a Template Variable that sends the mail: https://craftcms.com/docs/plugins/variables

Not sure if I'd put this kind of logic in templates though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.