# Mailer Question

**URL:** <https://www.ruby-forum.com/t/mailer-question/117335>\
**Category:** Rails\
**Created:** [October 16, 2007, 1:26am UTC](https://www.ruby-forum.com/t/mailer-question/117335 "2007-10-16T01:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ccd318/32.png) [@elle](https://www.ruby-forum.com/u/elle)\
**Post date:** [October 16, 2007, 1:26am UTC](https://www.ruby-forum.com/t/mailer-question/117335/1 "2007-10-16T01:26:36Z")

</div>

Just a quick question:  
If I have one Action Mailer set for a contact form, but I also would  
like to send an email to both Admin and Customer once an order was  
placed, do I need to create another Action Mailer? or do I add a  
method in the order\_controller.rb to send the appropriate email? or do  
I do both?

Cheers,  
Elle

---

<div class="post-metadata">

**Author:** ![elle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ccd318/32.png) [@elle](https://www.ruby-forum.com/u/elle)\
**Post date:** [October 16, 2007, 2:05am UTC](https://www.ruby-forum.com/t/mailer-question/117335/2 "2007-10-16T02:05:39Z")

</div>

elle wrote:

> Just a quick question:  
> If I have one Action Mailer set for a contact form, but I also would  
> like to send an email to both Admin and Customer once an order was  
> placed, do I need to create another Action Mailer? or do I add a  
> method in the order\_controller.rb to send the appropriate email? or do  
> I do both?

You can add another method to your ActionMailer (model)

def admin\_notification(args)  
:  
:  
end

And add a new view admin\_notification.rhtml

Then call YourActionMailer.deliver\_admin\_notification(your\_args) from  
your controller.

(Don’t know what “args” you would have)

Or specify several To’s in your existing notification.

Stephan
