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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb55e14160a857b8a6fc2355551c8ad9121f1cd715afb741baa062793b1560b8
4
- data.tar.gz: 32251e93c2b3c08f3d59f185e427df7d84bea295be08a90c90a57854111dc976
3
+ metadata.gz: 523762bd4817881c5212cc60c53c8296454d0ac29c29d0cf20dd2350beb47cb7
4
+ data.tar.gz: 85d60684a427afe9afd4320ba40fabcfc93324af60384f80b8b5bebd5c8df082
5
5
  SHA512:
6
- metadata.gz: f0b424316ae395667c4c833f38944f955eb508104facf16f601a973f00b8603149592fa3b6cf9ae210ab2e0047df5ff7dcc59130415523a39cf02ec19c0d2dcf
7
- data.tar.gz: 17bcb1101f56de25245fcc319b693e7c8629a598a89dbeb971bebc28a00def77f86d100d8ef2e822cf57fc97b50b5aba1d5f9471e808660e5ceb3ae345d3d101
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
@@ -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}",
@@ -1,5 +1,5 @@
1
1
  module OhMySMTP
2
2
  module Rails
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
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.5
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-27 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails