ohmysmtp-rails 0.1.5 → 0.1.6
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/README.md +25 -0
- data/lib/ohmysmtp-rails.rb +2 -1
- data/lib/ohmysmtp-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523762bd4817881c5212cc60c53c8296454d0ac29c29d0cf20dd2350beb47cb7
|
4
|
+
data.tar.gz: 85d60684a427afe9afd4320ba40fabcfc93324af60384f80b8b5bebd5c8df082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb9f127dc921ae6a0e2a9a9f6bc81e79f42bd59c792f05338c43e75b5ab37e711ddee2ab1d923fed37f6d103a3b2063aa706e606f1643384821ff43b226e2b1e
|
7
|
+
data.tar.gz: b4a59456d2706587ca69a15dfc5d22fbbba37c1ad6e8c73880eefce41e7a61d2e68ba3bc52594ca544cca33c91b7310cf063663dc228cdd5eb8b010ce9b130e4
|
data/README.md
CHANGED
@@ -81,6 +81,31 @@ config.action_mailer.delivery_method = :ohmysmtp
|
|
81
81
|
config.action_mailer.ohmysmtp_settings = { :api_token => Rails.application.secrets.ohmysmtp_api_token }
|
82
82
|
```
|
83
83
|
|
84
|
+
## Tagging
|
85
|
+
|
86
|
+
You can tag messages and filter them later in the OhMySMTP UI. To do this, pass the tags as a header by adding a tag variable to your `mail` method call.
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
class TestMailer < ApplicationMailer
|
90
|
+
default from: 'notifications@example.com',
|
91
|
+
to: 'fake@sdfasdfsdaf.com'
|
92
|
+
|
93
|
+
def single_tag
|
94
|
+
mail(
|
95
|
+
tags: 'test tag' # One tag
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
def multi_tag
|
100
|
+
mail(
|
101
|
+
tags: "['test tag', 'another-tag']" # Multiple tags
|
102
|
+
)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
Note that this should always be a string, even if using an array of multiple tags.
|
108
|
+
|
84
109
|
## Support
|
85
110
|
|
86
111
|
For support please check the [OhMySMTP Documentation](https://docs.ohmysmtp.com) or contact us at support@ohmysmtp.com
|
data/lib/ohmysmtp-rails.rb
CHANGED
@@ -28,7 +28,8 @@ module OhMySMTP
|
|
28
28
|
cc: mail.cc&.join(','),
|
29
29
|
bcc: mail.bcc&.join(','),
|
30
30
|
replyto: mail.reply_to,
|
31
|
-
attachments: format_attachments(mail.attachments)
|
31
|
+
attachments: format_attachments(mail.attachments),
|
32
|
+
tags: mail.header['tags'].to_s
|
32
33
|
}.compact.to_json,
|
33
34
|
headers: {
|
34
35
|
'User-Agent' => "OhMySMTP Rails Gem v#{OhMySMTP::Rails::VERSION}",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohmysmtp-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OhMySMTP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|