My environment.tb file has these lines at the VERY bottom of it, with
nothing coming after the closed bracket:
ActionMailer::Base.server_settings = {
:address => “aromatherapymassageyeovil.co.uk”,
:port => 25,
:domain => ‘aromatherapymassageyeovil.co.uk’,
:user_name => “username”,
:password => ‘password’,
:authentication => :login
}
Obviously replace the username and password with the ones that you chose
when you set up your hosting account with A Small Orange. Also,
obviously, change the domains to your one.
Next, on my Radiant admin page I have a page called contact (a child
from the home page). Its behaviour (set at the bottom) is set to Mailer.
In this page I have the following:
<r:mailer:form name=“contact”>
<r:mailer:hidden name=“subject” value=“Floral Magic Enquiry” />
Name:
<r:mailer:text name=“name” />
Message:
<r:mailer:textarea name=“message” />
<r:mailer:submit value=“Send” />
</r:mailer:form>
I created a new part for this page (by clicking the green plus icon on
the right) and named it config. In this part I have:
mailers:
contact:
subject: Contact Form
from: [email protected]
redirect_to: /contact/thank-you/
recipients:
- [email protected]
Make sure that the indents look exactly the same, and that you replace
the two email addresses with your own, and ones that ACTUALLY work. I
made this mistake and used one I hadn’t actually set up yet. You can
evne use a hotmail address if you want.
Create another part for this page in the same way. Call it email. In
this part I have the following:
*** FLORAL MAGIC ENQUIRY ***
Name: <r:mailer:get name=“name”/>
Message: <r:mailer:get name=“message”/>
Sent: <r:date />
This basically formats the email that is sent with the form data. Next,
create a new page called thank-you that is a child of the Contact page.
Just put some simple text in this page.
All being well this should work!!!