actionmailbox 7.2.2.1 → 8.1.2

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: e57e9ec926760227bea1cd8ac42dcb3aeb89f3792bbe10ad797c4b701e16cf64
4
- data.tar.gz: c625f666c32d06af1341ffe5eaa8a30ac37e58bc9ce63f6221752f3cb0214aa6
3
+ metadata.gz: fea894c12a45c46c2f65794cb23f0d1d60268e0c4c471ec9be1401f525dad9e4
4
+ data.tar.gz: 3ef1973e457d1b6fc46a7d7bd72525435f7d85c491d7b2071b9f9796ac32e45c
5
5
  SHA512:
6
- metadata.gz: c72292f4b13f4d22d78e968458ba0d96fc3db6ca5afda20569ebdf3d48edcba794fee9c2efe017318f487fd2d3e7bce6690c2b9aa81802a177b880ece49d90b9
7
- data.tar.gz: 94f3d46deaf541cc3dba1069f17f3d9e88118221de437408f46549e3d303df8913fcd5465e1676614314e63c7b7485231d65338df6fb1f0689e205922b524e4b
6
+ metadata.gz: e7af990e277d9a0a406cc8ab534fc4d3aba0ff3d2ea729299b3a8df7273ca3c03af79bbc5468dc3e63daa0cdd334130a6a19b144420ae7ae076729adeebd5fce
7
+ data.tar.gz: da06df62b4cdbf03ccc97396f1d21b5d32b8e38042768e42d2cca59de62cbea22265678ffc7aeca2222109bd5312e0dd5e78ae390fcd82b9dc5378d7c0c170b3
data/CHANGELOG.md CHANGED
@@ -1,33 +1,17 @@
1
- ## Rails 7.2.2.1 (December 10, 2024) ##
1
+ ## Rails 8.1.2 (January 08, 2026) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 7.2.2 (October 30, 2024) ##
6
+ ## Rails 8.1.1 (October 28, 2025) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 7.2.1.2 (October 23, 2024) ##
11
+ ## Rails 8.1.0 (October 22, 2025) ##
12
12
 
13
- * No changes.
14
-
15
-
16
- ## Rails 7.2.1.1 (October 15, 2024) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 7.2.1 (August 22, 2024) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 7.2.0 (August 09, 2024) ##
27
-
28
- * Fix all Action Mailbox database related models to respect
29
- `ActiveRecord::Base.table_name_prefix` configuration.
13
+ * Add `reply_to_address` extension method on `Mail::Message`.
30
14
 
31
- *Chedli Bourguiba*
15
+ *Mr0grog*
32
16
 
33
- Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actionmailbox/CHANGELOG.md) for previous changes.
17
+ Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/actionmailbox/CHANGELOG.md) for previous changes.
@@ -22,7 +22,7 @@ module ActionMailbox
22
22
  head :ok
23
23
  rescue JSON::ParserError => error
24
24
  logger.error error.message
25
- head :unprocessable_entity
25
+ head ActionDispatch::Constants::UNPROCESSABLE_CONTENT
26
26
  end
27
27
 
28
28
  def health_check
@@ -49,7 +49,7 @@ module ActionMailbox
49
49
  param_encoding :create, "RawEmail", Encoding::ASCII_8BIT
50
50
 
51
51
  def create
52
- ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("RawEmail")
52
+ ActionMailbox::InboundEmail.create_and_extract_message_id! mail
53
53
  rescue ActionController::ParameterMissing => error
54
54
  logger.error <<~MESSAGE
55
55
  #{error.message}
@@ -57,7 +57,14 @@ module ActionMailbox
57
57
  When configuring your Postmark inbound webhook, be sure to check the box
58
58
  labeled "Include raw email content in JSON payload".
59
59
  MESSAGE
60
- head :unprocessable_entity
60
+ head ActionDispatch::Constants::UNPROCESSABLE_CONTENT
61
61
  end
62
+
63
+ private
64
+ def mail
65
+ params.require("RawEmail").tap do |raw_email|
66
+ raw_email.prepend("X-Original-To: ", params.require("OriginalRecipient"), "\n") if params.key?("OriginalRecipient")
67
+ end
68
+ end
62
69
  end
63
70
  end
@@ -55,7 +55,7 @@ module ActionMailbox
55
55
  if request.body
56
56
  ActionMailbox::InboundEmail.create_and_extract_message_id! request.body.read
57
57
  else
58
- head :unprocessable_entity
58
+ head ActionDispatch::Constants::UNPROCESSABLE_CONTENT
59
59
  end
60
60
  end
61
61
 
@@ -52,7 +52,7 @@ module ActionMailbox
52
52
  ActionMailbox::InboundEmail.create_and_extract_message_id! mail
53
53
  rescue JSON::ParserError => error
54
54
  logger.error error.message
55
- head :unprocessable_entity
55
+ head ActionDispatch::Constants::UNPROCESSABLE_CONTENT
56
56
  end
57
57
 
58
58
  private
@@ -31,7 +31,7 @@ module Rails
31
31
  end
32
32
 
33
33
  def mail_params
34
- params.require(:mail).permit(:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body, attachments: [])
34
+ params.expect(mail: [:from, :to, :cc, :bcc, :x_original_to, :in_reply_to, :subject, :body, attachments: []])
35
35
  end
36
36
 
37
37
  def create_inbound_email(mail)
@@ -40,7 +40,7 @@
40
40
 
41
41
  <div>
42
42
  <%= form.label :body, "Body" %><br>
43
- <%= form.text_area :body, size: "40x20", value: params[:body] %>
43
+ <%= form.textarea :body, size: "40x20", value: params[:body] %>
44
44
  </div>
45
45
 
46
46
  <div>
@@ -5,7 +5,7 @@
5
5
  <%= form_with(url: main_app.rails_conductor_inbound_email_sources_path, local: true) do |form| %>
6
6
  <div>
7
7
  <%= form.label :source, "Source" %><br>
8
- <%= form.text_area :source, size: "80x60" %>
8
+ <%= form.textarea :source, size: "80x60" %>
9
9
  </div>
10
10
 
11
11
  <%= form.submit "Deliver inbound email" %>
@@ -29,7 +29,7 @@ module ActionMailbox
29
29
  initializer "action_mailbox.config" do
30
30
  config.after_initialize do |app|
31
31
  ActionMailbox.logger = app.config.action_mailbox.logger || Rails.logger
32
- ActionMailbox.incinerate = app.config.action_mailbox.incinerate.nil? ? true : app.config.action_mailbox.incinerate
32
+ ActionMailbox.incinerate = app.config.action_mailbox.incinerate.nil? || app.config.action_mailbox.incinerate
33
33
  ActionMailbox.incinerate_after = app.config.action_mailbox.incinerate_after || 30.days
34
34
  ActionMailbox.queues = app.config.action_mailbox.queues || {}
35
35
  ActionMailbox.ingress = app.config.action_mailbox.ingress
@@ -7,10 +7,10 @@ module ActionMailbox
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 7
11
- MINOR = 2
10
+ MAJOR = 8
11
+ MINOR = 1
12
12
  TINY = 2
13
- PRE = "1"
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -6,6 +6,10 @@ module Mail
6
6
  address_list(header[:from])&.addresses&.first
7
7
  end
8
8
 
9
+ def reply_to_address
10
+ address_list(header[:reply_to])&.addresses&.first
11
+ end
12
+
9
13
  def recipients_addresses
10
14
  to_addresses + cc_addresses + bcc_addresses + x_original_to_addresses + x_forwarded_to_addresses
11
15
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmailbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.2.1
4
+ version: 8.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  - George Claghorn
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-12-10 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
@@ -17,70 +16,70 @@ dependencies:
17
16
  requirements:
18
17
  - - '='
19
18
  - !ruby/object:Gem::Version
20
- version: 7.2.2.1
19
+ version: 8.1.2
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - '='
26
25
  - !ruby/object:Gem::Version
27
- version: 7.2.2.1
26
+ version: 8.1.2
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: activerecord
30
29
  requirement: !ruby/object:Gem::Requirement
31
30
  requirements:
32
31
  - - '='
33
32
  - !ruby/object:Gem::Version
34
- version: 7.2.2.1
33
+ version: 8.1.2
35
34
  type: :runtime
36
35
  prerelease: false
37
36
  version_requirements: !ruby/object:Gem::Requirement
38
37
  requirements:
39
38
  - - '='
40
39
  - !ruby/object:Gem::Version
41
- version: 7.2.2.1
40
+ version: 8.1.2
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: activestorage
44
43
  requirement: !ruby/object:Gem::Requirement
45
44
  requirements:
46
45
  - - '='
47
46
  - !ruby/object:Gem::Version
48
- version: 7.2.2.1
47
+ version: 8.1.2
49
48
  type: :runtime
50
49
  prerelease: false
51
50
  version_requirements: !ruby/object:Gem::Requirement
52
51
  requirements:
53
52
  - - '='
54
53
  - !ruby/object:Gem::Version
55
- version: 7.2.2.1
54
+ version: 8.1.2
56
55
  - !ruby/object:Gem::Dependency
57
56
  name: activejob
58
57
  requirement: !ruby/object:Gem::Requirement
59
58
  requirements:
60
59
  - - '='
61
60
  - !ruby/object:Gem::Version
62
- version: 7.2.2.1
61
+ version: 8.1.2
63
62
  type: :runtime
64
63
  prerelease: false
65
64
  version_requirements: !ruby/object:Gem::Requirement
66
65
  requirements:
67
66
  - - '='
68
67
  - !ruby/object:Gem::Version
69
- version: 7.2.2.1
68
+ version: 8.1.2
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: actionpack
72
71
  requirement: !ruby/object:Gem::Requirement
73
72
  requirements:
74
73
  - - '='
75
74
  - !ruby/object:Gem::Version
76
- version: 7.2.2.1
75
+ version: 8.1.2
77
76
  type: :runtime
78
77
  prerelease: false
79
78
  version_requirements: !ruby/object:Gem::Requirement
80
79
  requirements:
81
80
  - - '='
82
81
  - !ruby/object:Gem::Version
83
- version: 7.2.2.1
82
+ version: 8.1.2
84
83
  - !ruby/object:Gem::Dependency
85
84
  name: mail
86
85
  requirement: !ruby/object:Gem::Requirement
@@ -165,12 +164,11 @@ licenses:
165
164
  - MIT
166
165
  metadata:
167
166
  bug_tracker_uri: https://github.com/rails/rails/issues
168
- changelog_uri: https://github.com/rails/rails/blob/v7.2.2.1/actionmailbox/CHANGELOG.md
169
- documentation_uri: https://api.rubyonrails.org/v7.2.2.1/
167
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.2/actionmailbox/CHANGELOG.md
168
+ documentation_uri: https://api.rubyonrails.org/v8.1.2/
170
169
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
171
- source_code_uri: https://github.com/rails/rails/tree/v7.2.2.1/actionmailbox
170
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.2/actionmailbox
172
171
  rubygems_mfa_required: 'true'
173
- post_install_message:
174
172
  rdoc_options: []
175
173
  require_paths:
176
174
  - lib
@@ -178,15 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
176
  requirements:
179
177
  - - ">="
180
178
  - !ruby/object:Gem::Version
181
- version: 3.1.0
179
+ version: 3.2.0
182
180
  required_rubygems_version: !ruby/object:Gem::Requirement
183
181
  requirements:
184
182
  - - ">="
185
183
  - !ruby/object:Gem::Version
186
184
  version: '0'
187
185
  requirements: []
188
- rubygems_version: 3.5.22
189
- signing_key:
186
+ rubygems_version: 4.0.3
190
187
  specification_version: 4
191
188
  summary: Inbound email handling framework.
192
189
  test_files: []