Sha256: f9637e4d22d909ff6b78339ea24077d7a615e018276af62b506c4be5b20f519c
Contents?: true
Size: 761 Bytes
Versions: 8
Compression:
Stored size: 761 Bytes
Contents
# frozen_string_literal: true # MailerConfig module MailerConfig extend ActiveSupport::Concern private def setting SmtpSetting.first end def smtp ActionMailer::Base end def set_mailer_settings smtp.smtp_settings = { address: setting.address, port: setting.port, domain: setting.domain_name, authentication: 'plain', user_name: setting.email, password: setting.password } other_settings end def other_settings smtp.default_url_options = { host: setting.domain_name } smtp.raise_delivery_errors = true smtp.delivery_method = :smtp smtp.perform_deliveries = true smtp.default charset: 'utf-8' Devise.mailer_sender = "no-reply@#{setting.domain_name}" end end
Version data entries
8 entries across 7 versions & 1 rubygems