Topic: Rails Mailer - How can I send confirmation email to myself as well?

Hi guys,
I am currently using the "mailer gem" for sending emails to the users. It works perfectly but I'd love to send
a confirmation email to myself as well (to the administrator who has administator@gmail.com account). I was trying to write something like mailto: "administrator@gmail.com" but it wasn't working. I must be missing something.



This is app/mailers/user_mailer.rb file that I've got:


  default from: "administrator@gmail.com"

  def signup_confirmation(user)
    @user = user
    mail to: user.email, subject: "Sign Up Confirmation"   
  end
end

Last edited by Vierka (2012-07-17 12:24:17)

Re: Rails Mailer - How can I send confirmation email to myself as well?

Just pass a bcc option to default or the mail function:

default from: "administrator@gmail.com", bcc: "administator@gmail.com"

Re: Rails Mailer - How can I send confirmation email to myself as well?

Thank you so much, it worked!