Sha256: d9a01a0bbea6e6d56c1906ff37b383366ac57b183cea01567b9a617cdc52d5b5

Contents?: true

Size: 780 Bytes

Versions: 7

Compression:

Stored size: 780 Bytes

Contents

require 'action_mailer'

module Chatterbox::Services
  class Email
    class Mailer < ActionMailer::Base
      self.template_root = File.join(File.dirname(__FILE__), *%w[views])

      def self.reloadable?() false end

      def message(data={})
        data = data.dup.symbolize_keys
    
        content_type data[:config][:content_type] || "text/plain" 

        recipients data[:config][:to]
        from       data[:config][:from]

        reply_to   data[:config][:reply_to] if data[:config][:reply_to]
        bcc        data[:config][:bcc] if data[:config][:bcc]
        cc         data[:config][:cc] if data[:config][:cc]
      
        subject    data[:message][:summary]
        body       data[:message][:body] if data[:message][:body]
      end
    
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chatterbox-0.6.2 lib/chatterbox/services/email/mailer.rb
chatterbox-0.6.1 lib/chatterbox/services/email/mailer.rb
chatterbox-0.6.0 lib/chatterbox/services/email/mailer.rb
chatterbox-0.5.4 lib/chatterbox/services/email/mailer.rb
chatterbox-0.5.3 lib/chatterbox/services/email/mailer.rb
chatterbox-0.5.1 lib/chatterbox/services/email/mailer.rb
chatterbox-0.5.0 lib/chatterbox/services/email/mailer.rb