Action Mailer Confirmation Emails - Ruby on Rails
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
def signup_notification(recipient)
recipients recipient.email_address_with_name
bcc ["example@gmail.com"]
from "example@example.com"
subject "New account information"
body 开发者_如何学Go :account => recipient
end
end
I had to generate the user mailer model.
script/generate mailer UserMailer
精彩评论