mailers.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ##
  2. # Mailer methods can be defined using the simple format:
  3. #
  4. # email :registration_email do |name, user|
  5. # from '[email protected]'
  6. # to user.email
  7. # subject 'Welcome to the site!'
  8. # locals :name => name
  9. # content_type 'text/html' # optional, defaults to plain/text
  10. # via :sendmail # optional, to smtp if defined, otherwise sendmail
  11. # render 'registration_email'
  12. # end
  13. #
  14. # You can set the default delivery settings from your app through:
  15. #
  16. # set :delivery_method, :smtp => {
  17. # :address => 'smtp.yourserver.com',
  18. # :port => '25',
  19. # :user_name => 'user',
  20. # :password => 'pass',
  21. # :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
  22. # :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
  23. # }
  24. #
  25. # or sendmail (default):
  26. #
  27. # set :delivery_method, :sendmail
  28. #
  29. # or for tests:
  30. #
  31. # set :delivery_method, :test
  32. #
  33. # or storing emails locally:
  34. #
  35. # set :delivery_method, :file => {
  36. # :location => "#{Padrino.root}/tmp/emails",
  37. # }
  38. #
  39. # and then all delivered mail will use these settings unless otherwise specified.
  40. #
  41. HelloWorld::App.mailer :notifier do
  42. # Message definitions here ...
  43. end