mailosaur 7.15.0 → 7.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Mailosaur/analysis.rb +16 -0
- data/lib/Mailosaur/models/block_list_result.rb +18 -0
- data/lib/Mailosaur/models/content.rb +36 -0
- data/lib/Mailosaur/models/deliverability_report.rb +32 -0
- data/lib/Mailosaur/models/dns_records.rb +18 -0
- data/lib/Mailosaur/models/email_authentication_result.rb +21 -0
- data/lib/Mailosaur/models/message_create_options.rb +5 -0
- data/lib/Mailosaur/models/message_forward_options.rb +5 -0
- data/lib/Mailosaur/models/message_reply_options.rb +5 -0
- data/lib/Mailosaur/models/spam_assassin_result.rb +21 -0
- data/lib/Mailosaur/version.rb +1 -1
- data/lib/mailosaur.rb +6 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4e9715da4f69e6078392f4846fe8f85228b1cb0c8efd32f75ab5262ad0b7510
|
4
|
+
data.tar.gz: 42afb8a6023e449b90e4cb5c185ba02564b307460cdac6082edac492250ebc07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d439710cbb8ee21bc8956f6f9b14222e76ab9132e0826bfd4fb612934f3e45059ef3bdadead642c7689af76e3af8849f5f3ed2d4ba4c562e21967d7951f2c0b
|
7
|
+
data.tar.gz: 9300b227579346522080db84cfa5483f8662af6f288bed790025e0f50e5e4d547a58984132c0d9742f6e3ecbe8a9d75723a1a115e13e1e72fa4b18480a05588b
|
data/lib/Mailosaur/analysis.rb
CHANGED
@@ -27,5 +27,21 @@ module Mailosaur
|
|
27
27
|
model = JSON.parse(response.body)
|
28
28
|
Mailosaur::Models::SpamAnalysisResult.new(model)
|
29
29
|
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Perform a deliverability report
|
33
|
+
#
|
34
|
+
# Perform deliverability test on the specified email
|
35
|
+
#
|
36
|
+
# @param email The identifier of the email to be analyzed.
|
37
|
+
#
|
38
|
+
# @return [DeliverabilityReport] operation results.
|
39
|
+
#
|
40
|
+
def deliverability(email)
|
41
|
+
response = conn.get "api/analysis/deliverability/#{email}"
|
42
|
+
@handle_http_error.call(response) unless response.status == 200
|
43
|
+
model = JSON.parse(response.body)
|
44
|
+
Mailosaur::Models::DeliverabilityReport.new(model)
|
45
|
+
end
|
30
46
|
end
|
31
47
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class BlockListResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@id = data['id']
|
6
|
+
@name = data['name']
|
7
|
+
@result = data['result']
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :id
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :name
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :result
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class Content < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@embed = data['embed']
|
6
|
+
@iframe = data['iframe']
|
7
|
+
@object = data['object']
|
8
|
+
@script = data['script']
|
9
|
+
@short_urls = data['shortUrls']
|
10
|
+
@text_size = data['textSize']
|
11
|
+
@total_size = data['totalSize']
|
12
|
+
@missing_alt = data['missingAlt']
|
13
|
+
@missing_list_unsubscribe = data['missingListUnsubscribe']
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_accessor :embed
|
18
|
+
# @return [Boolean]
|
19
|
+
attr_accessor :iframe
|
20
|
+
# @return [Boolean]
|
21
|
+
attr_accessor :object
|
22
|
+
# @return [Boolean]
|
23
|
+
attr_accessor :script
|
24
|
+
# @return [Boolean]
|
25
|
+
attr_accessor :short_urls
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :text_size
|
28
|
+
# @return [Integer]
|
29
|
+
attr_accessor :total_size
|
30
|
+
# @return [Boolean]
|
31
|
+
attr_accessor :missing_alt
|
32
|
+
# @return [Boolean]
|
33
|
+
attr_accessor :missing_list_unsubscribe
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class DeliverabilityReport < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@spf = Mailosaur::Models::EmailAuthenticationResult.new(data['spf'])
|
6
|
+
@dkim = []
|
7
|
+
(data['dkim'] || []).each { |i| @dkim << Mailosaur::Models::EmailAuthenticationResult.new(i) }
|
8
|
+
@dmarc = Mailosaur::Models::EmailAuthenticationResult.new(data['dmarc'])
|
9
|
+
@block_lists = []
|
10
|
+
(data['blockLists'] || []).each { |i| @block_lists << Mailosaur::Models::BlockListResult.new(i) }
|
11
|
+
@content = Mailosaur::Models::Content.new(data['content'])
|
12
|
+
@dns_records = Mailosaur::Models::DnsRecords.new(data['dnsRecords'])
|
13
|
+
@spam_assassin = Mailosaur::Models::SpamAssassinResult.new(data['spamAssassin'])
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [EmailAuthenticationResult]
|
17
|
+
attr_accessor :spf
|
18
|
+
# @return [Array<EmailAuthenticationResult>]
|
19
|
+
attr_accessor :dkim
|
20
|
+
# @return [EmailAuthenticationResult]
|
21
|
+
attr_accessor :dmarc
|
22
|
+
# @return [Array<BlockListResult>]
|
23
|
+
attr_accessor :block_lists
|
24
|
+
# @return [Content]
|
25
|
+
attr_accessor :content
|
26
|
+
# @return [DnsRecords]
|
27
|
+
attr_accessor :dns_records
|
28
|
+
# @return [SpamAssassinResult]
|
29
|
+
attr_accessor :spam_assassin
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class DnsRecords < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@a = data['a']
|
6
|
+
@mx = data['mx']
|
7
|
+
@ptr = data['ptr']
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [Array<String>]
|
11
|
+
attr_accessor :a
|
12
|
+
# @return [Array<String>]
|
13
|
+
attr_accessor :mx
|
14
|
+
# @return [Array<String>]
|
15
|
+
attr_accessor :ptr
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class EmailAuthenticationResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@result = data['result']
|
6
|
+
@description = data['description']
|
7
|
+
@raw_value = data['rawValue']
|
8
|
+
@tags = data['tags']
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :result
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :description
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :raw_value
|
17
|
+
# @return [Hash<String,String>]
|
18
|
+
attr_accessor :tags
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -3,6 +3,7 @@ module Mailosaur
|
|
3
3
|
class MessageCreateOptions < BaseModel
|
4
4
|
def initialize(data = {})
|
5
5
|
@to = data['to']
|
6
|
+
@cc = data['cc']
|
6
7
|
@from = data['from']
|
7
8
|
@send = data['send']
|
8
9
|
@subject = data['subject']
|
@@ -15,6 +16,10 @@ module Mailosaur
|
|
15
16
|
# Must be a verified email address.
|
16
17
|
attr_accessor :to
|
17
18
|
|
19
|
+
# @return [String] The email address to which the email will be CC'd.
|
20
|
+
# Must be a verified email address.
|
21
|
+
attr_accessor :cc
|
22
|
+
|
18
23
|
# @return [String] Allows for the partial override of the message's
|
19
24
|
# 'from' address. This **must** be an address ending with
|
20
25
|
# `YOUR_SERVER.mailosaur.net`, such as `my-emails@a1bcdef2.mailosaur.net`.
|
@@ -3,6 +3,7 @@ module Mailosaur
|
|
3
3
|
class MessageForwardOptions < BaseModel
|
4
4
|
def initialize(data = {})
|
5
5
|
@to = data['to']
|
6
|
+
@cc = data['cc']
|
6
7
|
@text = data['text']
|
7
8
|
@html = data['html']
|
8
9
|
end
|
@@ -11,6 +12,10 @@ module Mailosaur
|
|
11
12
|
# Must be a verified email address.
|
12
13
|
attr_accessor :to
|
13
14
|
|
15
|
+
# @return [String] The email address to which the email will be CC'd.
|
16
|
+
# Must be a verified email address.
|
17
|
+
attr_accessor :cc
|
18
|
+
|
14
19
|
# @return [String] Any additional plain text content to forward the
|
15
20
|
# email with. Note that only text or html can be supplied, not both.
|
16
21
|
attr_accessor :text
|
@@ -2,11 +2,16 @@ module Mailosaur
|
|
2
2
|
module Models
|
3
3
|
class MessageReplyOptions < BaseModel
|
4
4
|
def initialize(data = {})
|
5
|
+
@cc = data['cc']
|
5
6
|
@text = data['text']
|
6
7
|
@html = data['html']
|
7
8
|
@attachments = data['attachments']
|
8
9
|
end
|
9
10
|
|
11
|
+
# @return [String] The email address to which the email will be CC'd.
|
12
|
+
# Must be a verified email address.
|
13
|
+
attr_accessor :cc
|
14
|
+
|
10
15
|
# @return [String] Any additional plain text content to include in
|
11
16
|
# the reply. Note that only text or html can be supplied, not both.
|
12
17
|
attr_accessor :text
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class SpamAssassinResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@score = data['score']
|
6
|
+
@result = data['result']
|
7
|
+
@rules = []
|
8
|
+
(data['rules'] || []).each { |i| @rules << Mailosaur::Models::SpamAssassinRule.new(i) }
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_accessor :spam_filter_results
|
12
|
+
|
13
|
+
# @return [Float]
|
14
|
+
attr_accessor :score
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :result
|
17
|
+
# @return [Array<SpamAssassinRule>]
|
18
|
+
attr_accessor :rules
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/Mailosaur/version.rb
CHANGED
data/lib/mailosaur.rb
CHANGED
@@ -39,6 +39,12 @@ module Mailosaur
|
|
39
39
|
autoload :Code, 'Mailosaur/models/code.rb'
|
40
40
|
autoload :ServerListResult, 'Mailosaur/models/server_list_result.rb'
|
41
41
|
autoload :SpamFilterResults, 'Mailosaur/models/spam_filter_results.rb'
|
42
|
+
autoload :DeliverabilityReport, 'Mailosaur/models/deliverability_report.rb'
|
43
|
+
autoload :EmailAuthenticationResult, 'Mailosaur/models/email_authentication_result.rb'
|
44
|
+
autoload :BlockListResult, 'Mailosaur/models/block_list_result.rb'
|
45
|
+
autoload :Content, 'Mailosaur/models/content.rb'
|
46
|
+
autoload :DnsRecords, 'Mailosaur/models/dns_records.rb'
|
47
|
+
autoload :SpamAssassinResult, 'Mailosaur/models/spam_assassin_result.rb'
|
42
48
|
autoload :ServerCreateOptions, 'Mailosaur/models/server_create_options.rb'
|
43
49
|
autoload :UsageAccountLimits, 'Mailosaur/models/usage_account_limits.rb'
|
44
50
|
autoload :UsageAccountLimit, 'Mailosaur/models/usage_account_limit.rb'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailosaur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailosaur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -148,10 +148,15 @@ files:
|
|
148
148
|
- lib/Mailosaur/messages.rb
|
149
149
|
- lib/Mailosaur/models/attachment.rb
|
150
150
|
- lib/Mailosaur/models/base_model.rb
|
151
|
+
- lib/Mailosaur/models/block_list_result.rb
|
151
152
|
- lib/Mailosaur/models/code.rb
|
153
|
+
- lib/Mailosaur/models/content.rb
|
154
|
+
- lib/Mailosaur/models/deliverability_report.rb
|
152
155
|
- lib/Mailosaur/models/device.rb
|
153
156
|
- lib/Mailosaur/models/device_create_options.rb
|
154
157
|
- lib/Mailosaur/models/device_list_result.rb
|
158
|
+
- lib/Mailosaur/models/dns_records.rb
|
159
|
+
- lib/Mailosaur/models/email_authentication_result.rb
|
155
160
|
- lib/Mailosaur/models/image.rb
|
156
161
|
- lib/Mailosaur/models/link.rb
|
157
162
|
- lib/Mailosaur/models/message.rb
|
@@ -176,6 +181,7 @@ files:
|
|
176
181
|
- lib/Mailosaur/models/server_create_options.rb
|
177
182
|
- lib/Mailosaur/models/server_list_result.rb
|
178
183
|
- lib/Mailosaur/models/spam_analysis_result.rb
|
184
|
+
- lib/Mailosaur/models/spam_assassin_result.rb
|
179
185
|
- lib/Mailosaur/models/spam_assassin_rule.rb
|
180
186
|
- lib/Mailosaur/models/spam_filter_results.rb
|
181
187
|
- lib/Mailosaur/models/usage_account_limit.rb
|
@@ -212,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
218
|
- !ruby/object:Gem::Version
|
213
219
|
version: '0'
|
214
220
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.4.19
|
216
222
|
signing_key:
|
217
223
|
specification_version: 4
|
218
224
|
summary: The Mailosaur Ruby library
|