forked from renz45/mandrill_mailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# MandrilMailer class for sending transactional emails through mandril. | ||
# Only template based emails are supported at this time. | ||
|
||
# Example usage: | ||
|
||
|
@@ -48,7 +47,7 @@ | |
# '[email protected]` | ||
# 2) | ||
# { email: '[email protected]', name: 'Bob Bertly' } | ||
# 3) | ||
# 3) | ||
# [{ email: '[email protected]', name: 'Bob Bertly' }, | ||
# { email: '[email protected]', name: 'Claire Nayo' }] | ||
# | ||
|
@@ -107,7 +106,7 @@ class CoreMailer | |
class InvalidEmail < StandardError; end | ||
class InvalidMailerMethod < StandardError; end | ||
class InvalidInterceptorParams < StandardError; end | ||
|
||
# Public: Other information on the message to send | ||
attr_accessor :message | ||
|
||
|
@@ -151,7 +150,7 @@ class << self | |
# Public: setup a way to test mailer methods | ||
# | ||
# mailer_method - Name of the mailer method the test setup is for | ||
# | ||
# | ||
# block - Block of code to execute to perform the test. The mailer | ||
# and options are passed to the block. The options have to | ||
# contain at least the :email to send the test to. | ||
|
@@ -176,7 +175,7 @@ def self.test_setup_for(mailer_method, &block) | |
# Public: Executes a test email | ||
# | ||
# mailer_method - Method to execute | ||
# | ||
# | ||
# options - The Hash options used to refine the selection (default: {}): | ||
# :email - The email to send the test to. | ||
# | ||
|
@@ -197,17 +196,17 @@ def self.test(mailer_method, options={}) | |
end | ||
|
||
end | ||
|
||
# Public: Triggers the stored Mandrill params to be sent to the Mandrill api | ||
def deliver | ||
mesg = "#{self.class.name}#deliver() is not implemented." | ||
raise NotImplementedError.new(mesg) | ||
end | ||
|
||
# Public: Build the hash needed to send to the mandrill api | ||
# | ||
# args - The Hash options used to refine the selection: | ||
|
||
# Examples | ||
# | ||
# mandrill_mail template: 'Group Invite', | ||
|
@@ -229,7 +228,7 @@ def data | |
mesg = "#{self.class.name}#data() is not implemented." | ||
raise NotImplementedError.new(mesg) | ||
end | ||
|
||
def check_required_options | ||
mesg = "#{self.class.name}#check_required_options() is not implemented." | ||
raise NotImplementedError.new(mesg) | ||
|
@@ -360,7 +359,7 @@ def to_params_item(item) | |
def api_key | ||
MandrillMailer.config.api_key | ||
end | ||
|
||
|
||
end | ||
end |