mailersend-ruby 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/mailersend/bulk_email/bulk_email.rb +3 -2
- data/lib/mailersend/email/email.rb +5 -3
- data/lib/mailersend/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1fbf1a6547aaabba0b217c571b89b104abb308b89fe7d724cd3012d97fd82c3
|
4
|
+
data.tar.gz: c9c28ef41fc5421c7ff83aac95ae4a9463922e85efc2302457c91307ba427d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a54404f2272a93c30d049a54fd6179cce1e8057c90274a8001680ca73d703835fbd14f5fdacc8fb991ea3013d6ddd55fc5ae308838404914065f38d11feb1f65
|
7
|
+
data.tar.gz: 0c4b04107b5cfd6952d80f07732e86e779c94e1dfc615956f9458bc55601c4fde1cd44c537799d7adf2e94e73f61c3b70a7b7f6b57cc8537d18642f5617e0b41
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @mailersend/ruby-sdk-maintainers
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -318,8 +318,8 @@ ms_email.add_text("Time is money, money is power, power is pizza, and pizza is k
|
|
318
318
|
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
|
319
319
|
|
320
320
|
# You can add one or multiple attachments
|
321
|
-
ms.add_attachment(content: "/Users/Jerry/Desktop/doc.pdf", filename: "doc.pdf")
|
322
|
-
ms.add_attachment(content: "/Users/Jerry/Desktop/pic.png", filename: "pic.png")
|
321
|
+
ms.add_attachment(content: "/Users/Jerry/Desktop/doc.pdf", filename: "doc.pdf", disposition: "attachment")
|
322
|
+
ms.add_attachment(content: "/Users/Jerry/Desktop/pic.png", filename: "pic.png", disposition: "attachment")
|
323
323
|
|
324
324
|
ms_email.send
|
325
325
|
```
|
@@ -13,12 +13,13 @@ module Mailersend
|
|
13
13
|
@messages = []
|
14
14
|
end
|
15
15
|
|
16
|
-
def add_attachment(content:, filename:)
|
16
|
+
def add_attachment(content:, filename:, disposition:)
|
17
17
|
data = File.read(content.to_s)
|
18
18
|
encoded = Base64.strict_encode64(data)
|
19
19
|
@attachments << {
|
20
20
|
'content' => encoded,
|
21
|
-
'filename' => filename
|
21
|
+
'filename' => filename,
|
22
|
+
'disposition' => disposition
|
22
23
|
}
|
23
24
|
end
|
24
25
|
|
@@ -86,12 +86,13 @@ module Mailersend
|
|
86
86
|
@tags << tags
|
87
87
|
end
|
88
88
|
|
89
|
-
def add_attachment(content:, filename:)
|
89
|
+
def add_attachment(content:, filename:, disposition:)
|
90
90
|
data = File.read(content.to_s)
|
91
91
|
encoded = Base64.strict_encode64(data)
|
92
92
|
@attachments << {
|
93
93
|
'content' => encoded,
|
94
|
-
'filename' => filename
|
94
|
+
'filename' => filename,
|
95
|
+
'disposition' => disposition
|
95
96
|
}
|
96
97
|
end
|
97
98
|
|
@@ -113,7 +114,8 @@ module Mailersend
|
|
113
114
|
'personalization' => @personalization,
|
114
115
|
'template_id' => @template_id,
|
115
116
|
'attachments' => @attachments,
|
116
|
-
'send_at' => @send_at
|
117
|
+
'send_at' => @send_at,
|
118
|
+
'tags' => @tags
|
117
119
|
}
|
118
120
|
|
119
121
|
client.http.post("#{API_URL}/email", json: message.delete_if { |_, value| value.to_s.strip == '' || value == [] || value == {} })
|
data/lib/mailersend/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailersend-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Milojević
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -119,6 +119,7 @@ extensions: []
|
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
121
|
- ".env.example"
|
122
|
+
- ".github/CODEOWNERS"
|
122
123
|
- ".github/workflows/main.yml"
|
123
124
|
- ".github/workflows/publish_gem.yml"
|
124
125
|
- ".gitignore"
|