Adam,
Two things. First of all, put the configuration in the 'mailer' part
(tab) on the page that has the form. Second, make sure your indentation
in the recipients list is two spaces; YAML is picky about that.
Sean
Adam Farnsworth wrote:
Can someone please confirm or correct this list of my understanding or
the mailer extension? I'm not understanding at all how this extension
works, and the two tutorials/instructions I found on the subject are
very vague:
I gathered this list by using these two instructions:
http://wiki.radiantcms.org/How_To_Use_The_Mailer_Extension
http://github.com/radiant/radiant-mailer-extension/tree/master
- You start out by git cloning the extension into the extension folder
at /vendor/extensions/
- You either do this step now, or at the end of the tutorial. Which
ever one, you remove code in the environment.rb (located in the config
folder) file to make this:
config.frameworks -= [ :action_mailer ] or this: config.frameworks
-= [ :action_web_service, :action_mailer ]
say this:
config.frameworks -= [] or this: config.frameworks -= [
:action_web_service ]
depending on whether or not the :action_web_service is being
ignored or not.
- You then possibly, or possibly not, add this code to the
environment.rb file, but after a line that doesn't seem to exist
(require "status"):
ActionMailer::Base.smtp_settings = {
:address => "your.smtp.server",
:port => 25,
:domain => "your.domain"
}
obviously changing the setting to match your own.
- Restart your server.
- You then create two new pages, under whatever previous page you'd
prefer, one named "email" the other "email_html" in that file you put
the following code:
subject: From the website of Whatever
from: [email protected]
redirect_to: /contact/thank-you
recipients:
- [email protected]
- [email protected]
- You then build your contact form with these tags:
<r:mailer:form name=""> ... </r:mailer:form>
<r:mailer:text 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:date_select name=""/>
<r:mailer:textarea name=""> ... </r:mailer:textarea>
<r:mailer:option name="" />
to make something that looks something like this:
<r:mailer:form>
<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/>
<input type="submit" value="Send" />
</r:mailer:form>
If someone who has gotten the extension to work please let me know
where I went wrong, it would be very helpful. By doing everything
above I get the following error in a browser:
Mailer config is not valid (see Mailer.valid_config?)
Thanks,
Adam
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant