= Mailer Extension for Radiant
The Mailer extension enables form mail on a page.
== Usage
You can define email templates using pages parts (email, and/or email_html).
You configure the recipients and other Mailer settings in a "mailer" part:
subject: From the website of Whatever
from: noreply@example.com
redirect_to: /contact/thank-you
recipients:
- one@one.com
- two@two.com
The following tags are available to help you build the form:
... ... ... ...
Simple example of a form:
Name:
Message:
== User-provided Configuration
Sometimes, rather than explicitly configuring the recipients and such in the mailer part, you'd rather have them passed in by the person submitting the form. Mailer supports this by allowing you to specify a form field to pull the value from:
from_field: my_form_field_that_contains_the_from_email_address
Then you just have to add that field to your mailer form and you're all set.
This is supported for the from (from_field), recipients (recipients_field) and reply_to (reply_to_field) properties.
== Enabling action_mailer
In environment.rb you'll probably need to change:
config.frameworks -= [ :action_mailer ]
to:
config.frameworks -= []
== Caveats
Relative urls will almost certainly not work if the mailer fails validation. Solution? Only use absolute urls.
== History
Created by: M@ McCray - mattmccray.com
Version: 0.2.1
Contact: mmccray@elucidata.net
Ported to 'mental' by: Sean Cribbs - seancribbs.com
Version: 0.1
Contact: seancribbs@gmail.com
Seriously restructured by: Nathaniel Talbott - terralien.com
Version: 0.2
Contact: nathaniel@terralien.com
Work sponsored by: Ignite Social Media, http://ignitesocialmedia.com/
== Todo
* Support for file attachments to emails
* Tests