You will get this error if you do not have a "mailer" page part set up
and configured correctly. I didn't create a "email" or "email_html"
page parts, but just used the "body" part to setup the form template.
Here is an example I used for the template:
<code>
<r:mailer:form name="contact">
<br/>
Your Email Address: <r:mailer:if_error on="from"><span
class="errormess">Your email address <r:mailer:if_error:message
/></span></r:mailer:if_error><br/>
<r:mailer:text name="from" required="true" /> <br/>
Subject: <r:mailer:if_error on="subject"><span class="errormess">A
subject <r:mailer:if_error:message /></span></r:mailer:if_error><br/>
<r:mailer:text name="subject" required="true" /> <br/>
Message: <r:mailer:if_error on="message"><span class="errormess">A
message <r:mailer:if_error:message /></span></r:mailer:if_error><br/>
<r:mailer:textarea name="message" required="true" cols="80"/><br/>
<input type="submit" value="Send" />
</r:mailer:form>
</code>
Then I configured the "mailer" page part with the following YAML settings:
redirect_to: /information/contact-us/email-sent
from_field: from
reply_to_field: from
recipients:
- m...@domain
I also added a styles page part that is then included in my layout as
CSS so the error messages would come out in red. The "styles" part is
set to this:
.errormess {
color: red;
}
Hope this helps,
Jason
Jim Gay wrote:
On Feb 3, 2009, at 10:54 PM, Adam Farnsworth wrote:
Does anyone know where it's talking about when it says:
"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:"
I can't figure out where you are supposed to change these settings so
that they take effect. I have created a Page called "Email" and saved
the sample code into it, I get the following error: Mailer config is
not valid (see Mailer.valid_config?)
Any ideas?
I just ran into this myself today.
I'm not really sure about all the code in the mailer extension, but
one problem I've found is that it tries to use an instance variable
called @config for the configuration options which is the same name as
one that Radiant itself uses.
I've fixed this in my branch, but haven't sent a pull request to the
main repo yet
http://github.com/saturnflyer/radiant-mailer-extension/tree/master
http://github.com/saturnflyer/radiant-mailer-extension/commits/master
_______________________________________________
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