Guest User

Untitled

a guest
Jun 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class UserNotifier < ActionMailer::Base
  2.  
  3. def general(user, from, subject, content)
  4. setup_email(user)
  5. @from = from
  6. @subject += subject
  7. @body[:content] = content
  8. end
  9.  
  10. protected
  11.  
  12. def setup_email(user)
  13. @recipients = "#{user.email}" if user
  14. @from = Mentoring.admin_email
  15. @sent_on = Time.now.utc
  16. @subject = ""
  17. @body[:user] = user
  18. @content_type = 'text/html'
  19. @charset = 'UTF-8'
  20. end
  21.  
  22. end
Add Comment
Please, Sign In to add comment