Advertisement
Guest User

Untitled

a guest
Jul 14th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. undefined method `email' for #<Hash:0x007fcfaeb88280>
  2.  
  3. config.action_mailer.default_url_options = { host: 'localhost' }
  4.  
  5. ActionMailer::Base.smtp_settings = {
  6. address: 'smtp.gmail.com',
  7. port: '587',
  8. domain: 'xxxx.com',
  9. authentication: :plain,
  10. user_name: 'xxxx@gmail.com',
  11. password: 'xxxx',
  12. enable_starttls_auto: true
  13. }
  14. end
  15.  
  16. resque initializer
  17. require "resque/tasks"
  18.  
  19. task "resque:setup" => :environment
  20.  
  21. class UserMailer < ActionMailer::Base
  22. default from: 'xxx'
  23. include Resque::Mailer
  24.  
  25.  
  26. def registration_confirmation(user)
  27. @user = user
  28. mail to: user.email, subject: 'Confirm registration', &:html
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement