mailtrap 2.1.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +5 -5
- data/README.md +1 -0
- data/lib/mailtrap/client.rb +1 -1
- data/lib/mailtrap/mail/base.rb +9 -6
- data/lib/mailtrap/mail/from_template.rb +9 -7
- data/lib/mailtrap/version.rb +1 -1
- data/mailtrap.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c959ed779f29713f1c7cb977d5037b6ab184e3841ad79a77450fb92bf6d21a05
|
4
|
+
data.tar.gz: 8fa5d1112e6fa683227bd6b00b2e538dccae08edf2894c1d8f8f275aa247e42e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88a1161a35e016f35a452822edf0c7483b984f9161612b4e433d9782e9177017af7483eab24c03727523dbbb03ba98ad5b25f22683b1e4c5b949aa604f7266e
|
7
|
+
data.tar.gz: 88aeb1e006f5f2e1c2ac9a50d4dfaf4090b36435955ad790aa60b320f17cffe05aa15a998dd630977015e05352e48f54908fbbff0f15316944f6c773546866e2
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [2.3.0] - 2025-03-06
|
2
|
+
|
3
|
+
- Drop Ruby 3.0 support
|
4
|
+
- Update dependencies
|
5
|
+
|
6
|
+
## [2.2.0] - 2024-12-18
|
7
|
+
|
8
|
+
- Added `reply_to` parameter support
|
9
|
+
|
1
10
|
## [2.1.2] - 2024-12-13
|
2
11
|
|
3
12
|
- Improved handling of invalid `from`, `to`, `cc`, `bcc` headers when sending
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mailtrap (2.
|
4
|
+
mailtrap (2.3.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
crack (1.0.0)
|
18
18
|
bigdecimal
|
19
19
|
rexml
|
20
|
-
date (3.
|
20
|
+
date (3.4.1)
|
21
21
|
diff-lcs (1.5.1)
|
22
22
|
hashdiff (1.1.0)
|
23
23
|
json (2.7.2)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
net-pop
|
29
29
|
net-smtp
|
30
30
|
mini_mime (1.1.5)
|
31
|
-
net-imap (0.
|
31
|
+
net-imap (0.5.6)
|
32
32
|
date
|
33
33
|
net-protocol
|
34
34
|
net-pop (0.1.2)
|
@@ -82,7 +82,7 @@ GEM
|
|
82
82
|
rubocop (~> 1.61)
|
83
83
|
ruby-progressbar (1.13.0)
|
84
84
|
thor (1.3.1)
|
85
|
-
timeout (0.4.
|
85
|
+
timeout (0.4.3)
|
86
86
|
unicode-display_width (2.5.0)
|
87
87
|
vcr (6.2.0)
|
88
88
|
webmock (3.23.1)
|
@@ -108,4 +108,4 @@ DEPENDENCIES
|
|
108
108
|
webmock
|
109
109
|
|
110
110
|
BUNDLED WITH
|
111
|
-
2.5
|
111
|
+
2.6.5
|
data/README.md
CHANGED
data/lib/mailtrap/client.rb
CHANGED
@@ -35,7 +35,7 @@ module Mailtrap
|
|
35
35
|
raise ArgumentError, 'api_key is required' if api_key.nil?
|
36
36
|
raise ArgumentError, 'api_port is required' if api_port.nil?
|
37
37
|
|
38
|
-
api_host ||= select_api_host(bulk
|
38
|
+
api_host ||= select_api_host(bulk:, sandbox:)
|
39
39
|
raise ArgumentError, 'inbox_id is required for sandbox API' if sandbox && inbox_id.nil?
|
40
40
|
|
41
41
|
@api_key = api_key
|
data/lib/mailtrap/mail/base.rb
CHANGED
@@ -5,12 +5,13 @@ require 'json'
|
|
5
5
|
module Mailtrap
|
6
6
|
module Mail
|
7
7
|
class Base
|
8
|
-
attr_accessor :from, :to, :cc, :bcc, :headers, :custom_variables, :subject, :text, :html, :category
|
8
|
+
attr_accessor :from, :to, :reply_to, :cc, :bcc, :headers, :custom_variables, :subject, :text, :html, :category
|
9
9
|
attr_reader :attachments
|
10
10
|
|
11
11
|
def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
|
12
12
|
from: nil,
|
13
13
|
to: [],
|
14
|
+
reply_to: nil,
|
14
15
|
cc: [],
|
15
16
|
bcc: [],
|
16
17
|
subject: nil,
|
@@ -23,6 +24,7 @@ module Mailtrap
|
|
23
24
|
)
|
24
25
|
@from = from
|
25
26
|
@to = to
|
27
|
+
@reply_to = reply_to
|
26
28
|
@cc = cc
|
27
29
|
@bcc = bcc
|
28
30
|
@subject = subject
|
@@ -38,6 +40,7 @@ module Mailtrap
|
|
38
40
|
{
|
39
41
|
'from' => from,
|
40
42
|
'to' => to,
|
43
|
+
'reply_to' => reply_to,
|
41
44
|
'cc' => cc,
|
42
45
|
'bcc' => bcc,
|
43
46
|
'subject' => subject,
|
@@ -64,11 +67,11 @@ module Mailtrap
|
|
64
67
|
|
65
68
|
def add_attachment(content:, filename:, type: nil, disposition: nil, content_id: nil)
|
66
69
|
attachment = Mailtrap::Attachment.new(
|
67
|
-
content
|
68
|
-
filename
|
69
|
-
type
|
70
|
-
disposition
|
71
|
-
content_id:
|
70
|
+
content:,
|
71
|
+
filename:,
|
72
|
+
type:,
|
73
|
+
disposition:,
|
74
|
+
content_id:
|
72
75
|
)
|
73
76
|
attachments << attachment
|
74
77
|
|
@@ -8,6 +8,7 @@ module Mailtrap
|
|
8
8
|
def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
|
9
9
|
from: nil,
|
10
10
|
to: [],
|
11
|
+
reply_to: nil,
|
11
12
|
cc: [],
|
12
13
|
bcc: [],
|
13
14
|
attachments: [],
|
@@ -17,13 +18,14 @@ module Mailtrap
|
|
17
18
|
template_variables: {}
|
18
19
|
)
|
19
20
|
super(
|
20
|
-
from
|
21
|
-
to
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
from:,
|
22
|
+
to:,
|
23
|
+
reply_to:,
|
24
|
+
cc:,
|
25
|
+
bcc:,
|
26
|
+
attachments:,
|
27
|
+
headers:,
|
28
|
+
custom_variables:
|
27
29
|
)
|
28
30
|
@template_uuid = template_uuid
|
29
31
|
@template_variables = template_variables
|
data/lib/mailtrap/version.rb
CHANGED
data/mailtrap.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Official mailtrap.io API client'
|
13
13
|
spec.homepage = 'https://github.com/railsware/mailtrap-ruby'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = '>= 3.
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = 'https://github.com/railsware/mailtrap-ruby'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailtrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Railsware Products Studio LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Official mailtrap.io API client
|
14
14
|
email:
|
@@ -55,7 +55,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 3.
|
58
|
+
version: 3.1.0
|
59
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|