Sha256: e5a943bd997035fd622183e11946a8a0236f942a14569dd0907264a20ac4449e

Contents?: true

Size: 680 Bytes

Versions: 30

Compression:

Stored size: 680 Bytes

Contents

require 'roadie-rails'

class RadSocialMailer < ApplicationMailer
  include Roadie::Rails::Automatic

  def social_mail options
    from_address = Mail::Address.new options[:from] # ex: "john@example.com"
    from_address.display_name = options[:from_name] # ex: "John Doe"

    @from_name = from_address.display_name
    @from_email = from_address
    @message = options[:message]
    @actual_from = ENV['RAD_SOCIAL_FROM_EMAIL']
    @actual_from = from_address if @actual_from.nil?

    mail({
      to: options[:to],
      from: @actual_from,
      reply_to: @from_email,
      subject: options[:subject],
      text: @message,
      content_type: "text/html"
     })
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
trusty-cms-4.1.2 app/mailers/rad_social_mailer.rb
trusty-cms-4.1.1 app/mailers/rad_social_mailer.rb
trusty-cms-4.1.0 app/mailers/rad_social_mailer.rb
trusty-cms-4.0.2 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.7 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.6 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.5 app/mailers/rad_social_mailer.rb
trusty-cms-4.0.1 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.4 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.3 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.2 app/mailers/rad_social_mailer.rb
trusty-cms-4.0.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.1 app/mailers/rad_social_mailer.rb
trusty-cms-3.9.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.8.4 app/mailers/rad_social_mailer.rb
trusty-cms-3.8.3 app/mailers/rad_social_mailer.rb
trusty-cms-3.8.2 app/mailers/rad_social_mailer.rb
trusty-cms-3.8.1 app/mailers/rad_social_mailer.rb
trusty-cms-3.8.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.7.1 app/mailers/rad_social_mailer.rb