Action Mailer Confirmation Emails - Ruby on Rails...

Posted by bgadoci on Stack Overflow See other posts from Stack Overflow or by bgadoci
Published on 2010-04-28T17:40:36Z Indexed on 2010/04/28 17:57 UTC
Read the original article Hit count: 389

I have successfully installed the Clearance Gem from ThoughtBot. Clearance sends a confirmation email upon a new sign_up and suggests adding:

config.action_mailer.default_url_options = { :host => 'localhost:3000' }

to your /environments/test.rb and development.rb. I have tried this and also

config.action_mailer.default_url_options = { :host => '127.0.0.1', :port => 3000 }

But can't seem to get rails to send the email. As I am new to both Ruby and Rails, I am wondering if there is some step/config that ThoughtBot is assuming I have already done to send emails.

What am I doing wrong/missing?

UPDATE: Just added notifier.rb

class Notifier < ActionMailer::Base
  recipients recipient.email_address_with_name
       bcc        ["[email protected]"]
       from       "[email protected]"
       subject    "New account information"
       body       :account => recipient
     end

end

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby