Sha256: fcdbcd79b5946cb87fe6c8e8be3bfc9e47ee0abb47eae5b9b5f522ee583fd69d

Contents?: true

Size: 656 Bytes

Versions: 25

Compression:

Stored size: 656 Bytes

Contents

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

25 entries across 25 versions & 1 rubygems

Version Path
trusty-cms-3.4.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.7 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.6 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.5 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.3 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.2 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.1 app/mailers/rad_social_mailer.rb
trusty-cms-3.2.1 app/mailers/rad_social_mailer.rb
trusty-cms-3.3.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.2.0 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.11 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.10 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.9 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.8 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.7 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.6 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.5 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.3 app/mailers/rad_social_mailer.rb
trusty-cms-3.1.2 app/mailers/rad_social_mailer.rb
trusty-cms-3.0.11 app/mailers/rad_social_mailer.rb