Sha256: a12be68a308ab28c13778c97564b8d46501f39dd8ac9d608e68a9fb86bcc8bc0

Contents?: true

Size: 1.17 KB

Versions: 12

Compression:

Stored size: 1.17 KB

Contents

# An interface to the Mandrill API
# @example
#   MandrillClient.send_template(template_name(string), template_content(array), message(hash))
# @deprecated Please use {MnoEnterprise::MailClient}
module MandrillClient
  class << self
    # Return a mandrill client configured with the right API key
    # @deprecated Use MnoEnterprise::MailClient
    def client
      @client ||= Mandrill::API.new(MnoEnterprise.mandrill_key)
    end
    
    # Send the provided template with options
    #
    # @example MandrillClient.send_template(template_name(string), template_content(array), message(hash))
    # @deprecated Use MnoEnterprise::MailClient
    def send_template(*args)
      warn '[DEPRECATION] `MandrillClient` is deprecated. Please use `MnoEnterprise::MailClient` instead.'
      MnoEnterprise::MailClient.adapter.send_template(*args)
    end
    
    # A simpler version of send_template
    #
    # @deprecated Use MnoEnterprise::MailClient
    def deliver(template,from,to,vars = {},opts = {})
      warn '[DEPRECATION] `MandrillClient` is deprecated. Please use `MnoEnterprise::MailClient` instead.'
      MnoEnterprise::MailClient.deliver(template,from,to,vars,opts)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mno-enterprise-core-3.4.0 lib/mandrill_client.rb
mno-enterprise-core-3.3.3 lib/mandrill_client.rb
mno-enterprise-core-3.3.2 lib/mandrill_client.rb
mno-enterprise-core-3.2.1 lib/mandrill_client.rb
mno-enterprise-core-3.3.1 lib/mandrill_client.rb
mno-enterprise-core-3.3.0 lib/mandrill_client.rb
mno-enterprise-core-3.2.0 lib/mandrill_client.rb
mno-enterprise-core-3.1.4 lib/mandrill_client.rb
mno-enterprise-core-3.1.3 lib/mandrill_client.rb
mno-enterprise-core-3.1.2 lib/mandrill_client.rb
mno-enterprise-core-3.1.1 lib/mandrill_client.rb
mno-enterprise-core-3.1.0 lib/mandrill_client.rb