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.

Did you see this?

Colin

Colin Law wrote in post #1174468: