class BaseMailer

Public Instance Methods

attach_user_image(user) click to toggle source

Returns user image.

# File app/mailers/base_mailer.rb, line 14
def attach_user_image(user)
  attachments.inline["#{user.name}.png"] = user.raw_image(:medium) rescue nil
end
setup_global_attachments() click to toggle source

Sets the global attachments in all mail.

# File app/mailers/base_mailer.rb, line 8
def setup_global_attachments
  attachments.inline['header_logo.png'] = File.read(File.join(Rails.root, 'app/assets/images/tutorsnew.png'))
  attachments.inline['footer_content.png'] = File.read(File.join(Rails.root, 'app/assets/images/logo.png'))
end
setup_mail_from() click to toggle source

To get default email

# File app/mailers/base_mailer.rb, line 19
def setup_mail_from
  ActsAsTenant.current_tenant ? Configurations::General.default_mail_from : Rails.application.secrets.default_mail_from
end