Automatic email from Rails form

I could have sworn I posted this yesterday but can’t find it anywhere

Anyway, I am trying to get my Rails form to post an e mail to a Manager
when someone hits the ‘Submit’ button of my leave request form (model is
‘absence’).

The Manager e mail is in a field called ‘mgremail’ (string). Other
fields are ‘name’ (string), ‘from (date)’, ‘to’ (date), ‘leavetype’
(string), ‘comments’ (text) all of which I want to include in the title
and/or body of the e mail.

I have tried to find an answer to this and have stumbled upon a couple
of potential answers, and a couple of video blogs etc, but none meet my
requirements. For example there is a Railscast about sending a
confirmation email for new users, which seems really easy until you try
to adapt it to my requirements then it falls on its face.

So, is there anyone who can help me to sort this? It’s kind of doing my
head in. Thanks in advance.

On 3 June 2015 at 09:50, Euan L. [email protected] wrote:

Anyway, I am trying to get my Rails form to post an e mail to a Manager
when someone hits the ‘Submit’ button of my leave request form (model is
‘absence’).

Did you see this?

Colin

Colin L. wrote in post #1174468:

On 3 June 2015 at 09:50, Euan L. [email protected] wrote:

Anyway, I am trying to get my Rails form to post an e mail to a Manager
when someone hits the ‘Submit’ button of my leave request form (model is
‘absence’).

Did you see this?
Action Mailer Basics — Ruby on Rails Guides

Colin

Jeez, how did I miss that? Maybe i should post a thread about how to
use Google properly.

Thanks, i’ll get the bits I need out of there I would imagine, i’ll let
you know if I have any issues.