mandrill-api 1.0.51 → 1.0.52
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mandrill/api.rb +13 -12
- metadata +4 -4
data/lib/mandrill/api.rb
CHANGED
@@ -447,7 +447,7 @@ module Mandrill
|
|
447
447
|
# @return [Array] Up to 1000 rejection entries
|
448
448
|
# - [Hash] return[] the information for each rejection blacklist entry
|
449
449
|
# - [String] email the email that is blocked
|
450
|
-
# - [String] reason the type of event (hard-bounce, soft-bounce, spam, unsub) that caused this rejection
|
450
|
+
# - [String] reason the type of event (hard-bounce, soft-bounce, spam, unsub, custom) that caused this rejection
|
451
451
|
# - [String] detail extended details about the event, such as the SMTP diagnostic for bounces or the comment for manually-created rejections
|
452
452
|
# - [String] created_at when the email was added to the blacklist
|
453
453
|
# - [String] last_event_at the timestamp of the most recent event that either created or renewed this rejection
|
@@ -831,11 +831,11 @@ module Mandrill
|
|
831
831
|
# @param [Boolean] async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
832
832
|
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
833
833
|
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
|
834
|
-
# @return [Array] of structs for each recipient containing the key "email" with the email address and
|
834
|
+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
835
835
|
# - [Hash] return[] the sending results for a single recipient
|
836
836
|
# - [String] email the email address of the recipient
|
837
837
|
# - [String] status the sending status of the recipient - either "sent", "queued", "scheduled", "rejected", or "invalid"
|
838
|
-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
|
838
|
+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
839
839
|
# - [String] _id the message's unique id
|
840
840
|
def send(message, async=false, ip_pool=nil, send_at=nil)
|
841
841
|
_params = {:message => message, :async => async, :ip_pool => ip_pool, :send_at => send_at}
|
@@ -908,19 +908,19 @@ module Mandrill
|
|
908
908
|
# @param [Boolean] async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
|
909
909
|
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
910
910
|
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
|
911
|
-
# @return [Array] of structs for each recipient containing the key "email" with the email address and
|
911
|
+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
912
912
|
# - [Hash] return[] the sending results for a single recipient
|
913
913
|
# - [String] email the email address of the recipient
|
914
914
|
# - [String] status the sending status of the recipient - either "sent", "queued", "rejected", or "invalid"
|
915
|
-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
|
915
|
+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
916
916
|
# - [String] _id the message's unique id
|
917
917
|
def send_template(template_name, template_content, message, async=false, ip_pool=nil, send_at=nil)
|
918
918
|
_params = {:template_name => template_name, :template_content => template_content, :message => message, :async => async, :ip_pool => ip_pool, :send_at => send_at}
|
919
919
|
return @master.call 'messages/send-template', _params
|
920
920
|
end
|
921
921
|
|
922
|
-
# Search
|
923
|
-
# @param [String] query
|
922
|
+
# Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use <a href="/api/docs/messages.html#method=info">/messages/info.json</a> to get the information for a single message, or <a href="http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks">webhooks</a> to push activity to your own application for querying.
|
923
|
+
# @param [String] query <a href="http://help.mandrill.com/entries/22211902">search terms</a> to find matching messages
|
924
924
|
# @param [String] date_from start date
|
925
925
|
# @param [String] date_to end date
|
926
926
|
# @param [Array] tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
|
@@ -1091,11 +1091,11 @@ module Mandrill
|
|
1091
1091
|
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
|
1092
1092
|
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately.
|
1093
1093
|
# @param [String] return_path_domain a custom domain to use for the messages's return-path
|
1094
|
-
# @return [Array] of structs for each recipient containing the key "email" with the email address and
|
1094
|
+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
|
1095
1095
|
# - [Hash] return[] the sending results for a single recipient
|
1096
1096
|
# - [String] email the email address of the recipient
|
1097
1097
|
# - [String] status the sending status of the recipient - either "sent", "queued", "scheduled", "rejected", or "invalid"
|
1098
|
-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
|
1098
|
+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
|
1099
1099
|
# - [String] _id the message's unique id
|
1100
1100
|
def send_raw(raw_message, from_email=nil, from_name=nil, to=nil, async=false, ip_pool=nil, send_at=nil, return_path_domain=nil)
|
1101
1101
|
_params = {:raw_message => raw_message, :from_email => from_email, :from_name => from_name, :to => to, :async => async, :ip_pool => ip_pool, :send_at => send_at, :return_path_domain => return_path_domain}
|
@@ -1156,11 +1156,12 @@ module Mandrill
|
|
1156
1156
|
|
1157
1157
|
# Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically.
|
1158
1158
|
# @param [String] email an email address to add to the whitelist
|
1159
|
+
# @param [String] comment an optional description of why the email was whitelisted
|
1159
1160
|
# @return [Hash] a status object containing the address and the result of the operation
|
1160
1161
|
# - [String] email the email address you provided
|
1161
|
-
# - [Boolean] whether the operation succeeded
|
1162
|
-
def add(email)
|
1163
|
-
_params = {:email => email}
|
1162
|
+
# - [Boolean] added whether the operation succeeded
|
1163
|
+
def add(email, comment=nil)
|
1164
|
+
_params = {:email => email, :comment => comment}
|
1164
1165
|
return @master.call 'whitelists/add', _params
|
1165
1166
|
end
|
1166
1167
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mandrill-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 127
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 52
|
10
|
+
version: 1.0.52
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mandrill Devs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2014-
|
18
|
+
date: 2014-06-26 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: json
|