# Can't get the mailer behavior to work

**URL:** <https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681>\
**Category:** Radiant CMS\
**Created:** [November 20, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681 "2006-11-20T14:47:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 20, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/1 "2006-11-20T14:47:20Z")

</div>

Hi Radiant list people, I’m new here!

First I have to say I was looking for a Rails CMS and I first tried  
Mephisto: it tries do a lot more like media buckets and things but  
it’s a real pain in the ass to setup and to use. Then I tried Radiant,  
damn this is the real CMS man 🙂 Love it.

But now I need a contact form. I installed the Mailer behavior from  
Elucidata. Here is my Contact page:

_body_ (borrowed from M@ McCray)  
\<r:mailer:form name=“contact”\>  
_Name:_ \<r:mailer:text name=“name” /\>  
  
_City:_ \<r:mailer:text name=“city” /\>  
  
_Email:_ \<r:mailer:text name=“email” /\>  
  
\<r:mailer:submit /\>  
\</r:mailer:form\>

_config_  
mailers:  
contact:  
subject: Contact depuis le site  
from: removed\_email\_address@domain.invalid  
redirect\_to: /contact/merci  
recipients:  
- removed\_email\_address@domain.invalid

And here’s what happen in my production.log:

Processing SiteController#show\_page (for 82.248.120.85 at 2006-11-20  
11:34:02) [POST]  
Parameters: {“mailer”=\>{“city”=\>“My City”, “name”=\>“My Name”,  
“email”=\>“removed\_email\_address@domain.invalid”}, “action”=\>“show\_page”,  
“url”=\>[“contact”], “mailer\_name”=\>“contact”, “controller”=\>“site”}

‘):umentError (syntax error on line 3, col 11: `from: removed_email_address@domain.invalid /usr/local/lib/ruby/1.8/yaml.rb:133:in`load’  
/usr/local/lib/ruby/1.8/yaml.rb:133:in `load' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/../app/models/behavior.rb:80:in`page\_config’  
/vendor/plugins/radiant\_mailer\_behavior/lib/mailer\_behavior.rb:28:in  
`process' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/../lib/advanced_delegation.rb:10:in`send’  
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/…/lib/advanced\_delegation.rb:10:in  
`process' /usr/local/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/../app/controllers/site_controller.rb:36:in`show\_uncached\_page’  
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/…/app/controllers/site\_controller.rb:22:in  
`show_page' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in`send’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:941:in  
`perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in`perform\_action\_without\_benchmark’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in`measure’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in`perform\_action’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:408:in  
`send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in`process\_without\_filters’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/filters.rb:377:in  
`process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in`process’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in  
`dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in`process\_request’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:54:in  
`process!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in`each\_cgi’  
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in  
`each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in`each\_cgi’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:53:in  
`process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in`process!’  
/var/www/john/rubynails/current/public/dispatch.fcgi:24

How can I fix that ? Thank you!

Jonathan

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 20, 2006, 11:46pm UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/2 "2006-11-20T23:46:43Z")

</div>

Jonathan Métillon wrote:

> _config_  
> mailers:  
> contact:  
> subject: Contact depuis le site  
> from: removed\_email\_address@domain.invalid  
> redirect\_to: /contact/merci  
> recipients:  
> - removed\_email\_address@domain.invalid

You’ve got the indentation wrong there. Try this:

mailers:  
contact:  
subject: Contact depuis le site  
from: removed\_email\_address@domain.invalid  
redirect\_to: /contact/merci  
recipients:  
- removed\_email\_address@domain.invalid

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 20, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/3 "2006-11-20T23:58:44Z")

</div>

Huh? Both code snippets are the same or is it just me?

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 21, 2006, 1:30am UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/4 "2006-11-21T01:30:57Z")

</div>

oh…k…didn’t get that. Didn’t think it was indent-sensitive. Thanks  
for  
the clarification.

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 21, 2006, 12:10am UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/5 "2006-11-21T00:10:47Z")

</div>

Ruben D. Orduz wrote:

> Huh? Both code snippets are the same or is it just me?

Look again:

> > > ```
> > > - removed_email_address@domain.invalid
> > > 
> > > ```
> > 
> > ```
> > - removed_email_address@domain.invalid
> > 
> > ```

In the first example “from” and the following keys are indented an extra  
level.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 21, 2006, 11:00am UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/6 "2006-11-21T11:00:11Z")

</div>

Thank you John that’s it!

I just copy/pasted from [http://tinyurl.com/ygecdg](http://tinyurl.com/ygecdg) and I don’t understand  
where this bad indent came from. Anyway, thanks again!

---

<div class="post-metadata">

**Author:** ![jonathan2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Post date:** [November 21, 2006, 11:56am UTC](https://www.ruby-forum.com/t/cant-get-the-mailer-behavior-to-work/76681/7 "2006-11-21T11:56:29Z")

</div>

Ah, this is not the post from M@ where I got this buggy config, but from  
the  
Elucidata page:

[http://www.elucidata.net/radiant/mailer-behavior](http://www.elucidata.net/radiant/mailer-behavior)

Also on this page, the “The following tags are…” section seems broken.
