Sha256: 588308eaaaf226b58124a6548c7f77c8ced60ce1c518a9cfd884efaa9d5eee14

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

require 'actionmailer'

module Chatterbox
  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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chatterbox-email-0.2.0 lib/chatterbox/mailer.rb