sendmail.rb 450 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
  2. class Channel::Driver::Sendmail
  3. def send(_options, attr, notification = false)
  4. # return if we run import mode
  5. return if Setting.get('import_mode')
  6. mail = Channel::EmailBuild.build(attr, notification)
  7. mail.delivery_method delivery_method
  8. mail.deliver
  9. end
  10. private
  11. def delivery_method
  12. return :test if Rails.env.test?
  13. :sendmail
  14. end
  15. end