2019-03-26 15:32:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-26 00:36:33 +00:00
|
|
|
# Configuración base del correo
|
2018-01-02 17:19:25 +00:00
|
|
|
class ApplicationMailer < ActionMailer::Base
|
2019-07-26 00:36:33 +00:00
|
|
|
helper :application
|
|
|
|
before_action :inline_logo!
|
|
|
|
|
|
|
|
default from: ENV.fetch('DEFAULT_FROM', "noreply@#{Site.domain}")
|
2018-01-02 17:19:25 +00:00
|
|
|
layout 'mailer'
|
2019-07-26 00:36:33 +00:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def inline_logo!
|
|
|
|
attachments.inline['logo.png'] ||=
|
2019-10-14 15:31:38 +00:00
|
|
|
File.read(Rails.root.join('app', 'assets', 'images', 'logo.png'))
|
2019-07-26 00:36:33 +00:00
|
|
|
end
|
2018-01-02 17:19:25 +00:00
|
|
|
end
|