trabajo-afectivo/app/models/channel/driver/smtp.rb

22 lines
587 B
Ruby
Raw Normal View History

2014-02-03 19:23:00 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
2015-08-28 00:53:14 +00:00
class Channel::Driver::Smtp
def send(options, attr, notification = false)
# return if we run import mode
return if Setting.get('import_mode')
mail = Channel::EmailBuild.build(attr, notification)
mail.delivery_method :smtp, {
openssl_verify_mode: 'none',
2015-08-28 00:53:14 +00:00
address: options[:host],
port: options[:port] || 25,
domain: options[:host],
user_name: options[:user],
password: options[:password],
enable_starttls_auto: true,
}
mail.deliver
end
end