Sha256: d8ffb222083e606d03a6aab843c985255eed3cc291f2c9dccd1d13921f24d293

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

# https://mandrillapp.com/api/docs/index.ruby.html

module Mailkick
  class Service
    class Mandrill < Mailkick::Service

      def initialize(options = {})
        require "mandrill"
        @mandrill = ::Mandrill::API.new(options[:api_key] || ENV["MANDRILL_APIKEY"])
      end

      def opt_outs
        # @mandrill.rejects.list.map do |record|
        #   record
        # end
        []
      end

      def self.discoverable?
        !!(defined?(::Mandrill::API) && ENV["MANDRILL_APIKEY"])
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailkick-0.0.1 lib/mailkick/service/mandrill.rb