Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails: Devise: post-confirmation error
- class EventMailer < ActionMailer::Base
- @user = User
- @host_name = "localhost:3000" if Rails.env.development?
- @host_name = "test.com" if Rails.env.test?
- @host_name = "production.com" if Rails.env.production?
- def self.send_email_to_admin
- @@smtp_settings = { #override default smtp settings since I'm using a difference sender
- :address => "smtp.gmail.com",
- :port => 587,
- :domain => @host_name,
- :authentication => "plain",
- :enable_starttls_auto_=> true,
- :user_name => ENV["ORG_FROM"],
- :password => ENV["ORG_FROM_PWD"],
- :to => ADMIN_RECIPIENTS
- #ADMIN_RECIPIENTS is defined elsewhere
- }
- mail(:subject => "Invite request received from " + @user.first.to_s + " " + @user.last.to_s)
- end
- end
- undefined method `mail' for EventMailer:Class
- app/mailers/event_mailer.rb:20:in `send_email_to_admin'
- app/controllers/confirmations_controller.rb:11:in `show'
- mail(:to => DENT_ADMIN_RECIPIENTS, :subject => "Invite request received from " + @user.first.to_s + " " + @user.last.to_s)
Add Comment
Please, Sign In to add comment