Guest User

Untitled

a guest
Jun 18th, 2018
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. ActionMailer::Base.delivery_method = :smtp
  2. ActionMailer::Base.smtp_settings = {
  3. :address => "mail.foo.com",
  4. :port => 25,
  5. :domain => "foo.com",
  6. :authentication => :email,
  7. :user_name => "no-reply@foo.com",
  8. :password => "foo1234567"
  9. }
  10.  
  11. class Notifications < ActionMailer::Base
  12.  
  13. def answered_question(faq)
  14. subject 'Your question has been answered'
  15. recipients faq.email
  16. from 'Foo <no-reply@foo.com>'
  17. sent_on Time.now
  18. content_type "text/html"
  19. body :faq => faq
  20. end
  21.  
  22.  
  23. def completed_order(order)
  24. subject 'Your order has been completed'
  25. recipients order.email
  26. from 'Foo <registrations@foo.com>'
  27. sent_on Time.now
  28. content_type "text/html"
  29. body :order => order
  30. end
  31. end
Add Comment
Please, Sign In to add comment