public
Fork of radiant/radiant-mailer-extension
Description: An extension for Radiant CMS that allows you to create 'contact us' and other mail-bound forms.
Homepage:
Clone URL: git://github.com/ntalbott/radiant-mailer-extension.git
seancribbs (author)
Fri Jun 20 11:32:17 -0700 2008
commit  a6dd0d045501d8210e7e558419634c6aa0115eda
tree    2300c7307939e1ce93b65f84d8bab49ee6b6e3da
name age message
file README Loading commit data...
file Rakefile Fri Jun 20 11:32:17 -0700 2008 Import from old repository. [seancribbs]
directory app/
directory lib/ Fri Jun 20 11:32:17 -0700 2008 Import from old repository. [seancribbs]
file mailer_extension.rb
directory public/ Fri Jun 20 11:32:17 -0700 2008 Import from old repository. [seancribbs]
directory test/
README
= Mailer Extension for Radiant

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

The Mailer extension enables form mail on a page. You can define email
templates using pages parts (email, and/or email_html). You configure
the recipients and other Mailer settings in a config part. Following
is an example of a properly formed config part that defines a 'contact'
mailer:

mailers:
  contact:
    subject: From the website of Whatever
    from: noreply@mydomain.com
    redirect_to: /contact/thank-you
    recipients:
      - one@one.com
      - two@two.com

The following tags are available to help you build the form:
    <r:mailer:form name=""> ... </r:mailer:form> 
    <r:mailer:text name="" /> 
    <r:mailer:password name="" />
    <r:mailer:file name="" />
    <r:mailer:checkbox name="" />
    <r:mailer:radio name="" />
    <r:mailer:radiogroup name=""> ... </r:mailer:radiogroup>
    <r:mailer:select name=""> ... </r:mailer:select>
    <r:mailer:textarea name=""> ... </r:mailer:textarea>
    <r:mailer:option name="" />
    <r:mailer:submit />
    <r:mailer:reset />
    <r:mailer:get name="" />

Simple example of a form:

<r:mailer:form name="contact">
 <r:mailer:hidden name="subject" value="Email from my Radiant site!" /> <br/>
  Name:<br/>
 <r:mailer:text name="name" /> <br/>
  Message:<br/>
 <r:mailer:textarea name="message" /> <br/>
 <r:mailer:submit value="Send" />
</r:mailer:form>


Todo:
 * Abstract tag naming, doesn't need to mimick HTML input types
 * Support for file attachments to emails
 * Validate recipient emails addresses -- at least the format
 * Better Error handling