Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:40:00+00:00 2026-06-10T09:40:00+00:00

I bought a Rails store (i am slowly learning), and when someone places an

  • 0

I bought a Rails store (i am slowly learning), and when someone places an order, I know they get an email because of the following code in the order_mailer.rb file:

class OrderMailer < ActionMailer::Base
  default from: 'xxxxx@xxxxxxxxx.com'

  def receipt(order)
    @order = order
    mail(to: order.user.email, subject: 'Your Order with Flagstuff.com')
  end
end

Is there an easy way to add myself as a CC to this email so I know when an order comes through?

From what I can gather, given my very limited knowledge of Rails, the orders_controllers.rb calls the order_mailer.rb when someone places an order. If I could locate that code and insert another .rb file (admin_email.rb) that looks almost identical, but with my email address instead of order.user.email, I think that might work.

I am looking for an easy answer and a learning experience =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:40:02+00:00Added an answer on June 10, 2026 at 9:40 am

    As an addition the answer from David, you can also add yourself as bcc if you change the defaults line to this:

    default from: 'xxxxx@xxxxxxxxx.com', 
            bcc: 'receiving_address@xxxxxxxx.com'
    

    check out the docs for more examples: http://api.rubyonrails.org/classes/ActionMailer/Base.html

    Also, this railscast might be interesting: http://railscasts.com/episodes/206-action-mailer-in-rails-3

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get rails setup up on a mac following this tutorial and
I bought Crafting Rails Applications this weekend and noticed that the author uses bundle
Yesterday, I bought a server on Linode. I setup Apache, RVM, Rails, MySQL and
I bought a SSL certificate through https://dnsimple.com/ for Heroku and got an email telling
i bought a web domain with some web space. They support only mySQL DB,
Ok, I just bought the new 27 inch iMac and I am trying get
Just bought Delphi 2010 (having skipped 2009) and I am trying to get my
I am new to rails and new to active merchant, just want to know
I'm starting a project using Rails and have bought a domain with Dreamhost. I've
I am learning some basic in rails, and found a difficulty in understanding a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.