We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Email-from-Template

Development and Programming

Michael Rog's avatar
Michael Rog
179 posts
about 16 years ago
Michael Rog's avatar Michael Rog

This one needs a better name. Please, somebody suggest a clever name.

This plugin will send tag contents in an email, with or without echoing that content back to the template.

PARAMETERS:

<b>to</b> - destination email address (default: site webmaster)
<b>from</b> - sender email address (default: site webmaster)
<b>subject</b> - email subject line (default: template URI)
<b>echo</b> - Set to "off" if you don't want to display the tag contents in the template.

VARIABLES:

{to}
{from}
{subject}
{ip}
{httpagent}
{uri_string}

EXAMPLE USAGE:

{exp:email_from_template to="[email protected]" from="[email protected]" subject="Hello!" echo="off"}
   This tag content is being viewed at {uri_string} by {httpagent}. Sending notification to {to}.
{/exp:email_from_template}

DOWNLOAD:

Get it here: http://michaelrog.com/go/ee

       
Nicolas Bottari's avatar
Nicolas Bottari
143 posts
15 years ago
Nicolas Bottari's avatar Nicolas Bottari

Awesome plugin! Thanks!

I have a question, though: can other EE tags, global variables, etc be used inside this plugin’s tag pair? Would those EE tags, global variables, etc be parsed before this plugin’s tag pair?

Also, can attachments also be sent?

Thank you.

       
Michael Rog's avatar
Michael Rog
179 posts
15 years ago
Michael Rog's avatar Michael Rog

Date/time and segment variables will work just fine, but standard Global Variables get assigned too late in the parse to appear in the email. (They’ll display on in the template just fine, though, if you leave the plugin’s “echo” parameter “on”.)

I added an {ip} variable to the plugin for this exact purpose: EE’s standard {ip_address} variable isn’t evaluated until after the plugin sends the email.

If there are other variables that would be useful to you, I’m happy to add them.

relevant docs: parsing order: http://expressionengine.com/wiki/Parse_Order/ standard globals: http://expressionengine.com/docs/templates/globals/single_variables.html

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.