actionmailbox 7.1.5.2 → 8.1.2.1

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: 0f591a75cd02cbca11925137242234a7e75c3116a4daa7807464c4f25232f6e2
4
- data.tar.gz: b1f106cd0a1a0b87f710413a6ac03f244193e0e9eeea817fd6289bdbee973e52
3
+ metadata.gz: 583fc761d986f82da3a1a37fa273dd96bc144a25228dc239090f58077be62d52
4
+ data.tar.gz: 1bbd205cf61287ac394d625808d749abea1eeef680dacd3f089c6277aae025ec
5
5
  SHA512:
6
- metadata.gz: 3394cd2f28c117a914db93277ed6109bab2a5c47f7cb697872ff914043ed8c46cc66a278319f46ad3b4482c3fcf20e5cb86cfd67b311bd93a95c17b679291cfe
7
- data.tar.gz: 1577eac1ff2652c593659c32cba1837c272ab75231164677335034855cb395d4e08a47c2633d51fbd81fc5bb1cfc4c4514217fc704a29f9bdbc0f4082f3c1b04
6
+ metadata.gz: e0b9a20a5b88cbf8bbf2c6841cc500bd25483e6d0b4a616d349e0516d952c98f1531d3b9a3fffa5fd0231903c47c9521a39f4310f4fbae61941b2c166c1dce9d
7
+ data.tar.gz: eb2b40b88b53efc6cd946c3f3cc55277d70032d45982c742871c7142d3a97b0c1ba438bea03f64e12cf72777faa155721ed978332f67599bc0244dee057bfaa8
data/CHANGELOG.md CHANGED
@@ -1,101 +1,22 @@
1
- ## Rails 7.1.5.2 (August 13, 2025) ##
1
+ ## Rails 8.1.2.1 (March 23, 2026) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 7.1.5.1 (December 10, 2024) ##
6
+ ## Rails 8.1.2 (January 08, 2026) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 7.1.5 (October 30, 2024) ##
11
+ ## Rails 8.1.1 (October 28, 2025) ##
12
12
 
13
13
  * No changes.
14
14
 
15
15
 
16
- ## Rails 7.1.4.2 (October 23, 2024) ##
16
+ ## Rails 8.1.0 (October 22, 2025) ##
17
17
 
18
- * No changes.
19
-
20
-
21
- ## Rails 7.1.4.1 (October 15, 2024) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 7.1.4 (August 22, 2024) ##
27
-
28
- * No changes.
29
-
30
-
31
- ## Rails 7.1.3.4 (June 04, 2024) ##
32
-
33
- * No changes.
34
-
35
-
36
- ## Rails 7.1.3.3 (May 16, 2024) ##
37
-
38
- * No changes.
39
-
40
-
41
- ## Rails 7.1.3.2 (February 21, 2024) ##
42
-
43
- * No changes.
44
-
45
-
46
- ## Rails 7.1.3.1 (February 21, 2024) ##
47
-
48
- * No changes.
49
-
50
-
51
- ## Rails 7.1.3 (January 16, 2024) ##
52
-
53
- * No changes.
54
-
55
-
56
- ## Rails 7.1.2 (November 10, 2023) ##
57
-
58
- * No changes.
59
-
60
-
61
- ## Rails 7.1.1 (October 11, 2023) ##
62
-
63
- * No changes.
64
-
65
-
66
- ## Rails 7.1.0 (October 05, 2023) ##
67
-
68
- * No changes.
69
-
70
-
71
- ## Rails 7.1.0.rc2 (October 01, 2023) ##
72
-
73
- * No changes.
74
-
75
-
76
- ## Rails 7.1.0.rc1 (September 27, 2023) ##
77
-
78
- * No changes.
79
-
80
-
81
- ## Rails 7.1.0.beta1 (September 13, 2023) ##
82
-
83
- * Added `bounce_now_with` to send the bounce email without going through a mailer queue.
84
-
85
- *Ronan Limon Duparcmeur*
86
-
87
- * Support configured primary key types in generated migrations.
88
-
89
- *Nishiki Liu*
90
-
91
- * Fixed ingress controllers' ability to accept emails that contain no UTF-8 encoded parts.
92
-
93
- Fixes #46297.
94
-
95
- *Jan Honza Sterba*
96
-
97
- * Add X-Forwarded-To addresses to recipients.
18
+ * Add `reply_to_address` extension method on `Mail::Message`.
98
19
 
99
- *Andrew Stewart*
20
+ *Mr0grog*
100
21
 
101
- Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actionmailbox/CHANGELOG.md) for previous changes.
22
+ 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
@@ -45,9 +45,9 @@ module ActionMailbox
45
45
  #
46
46
  # Built-in ingress commands are available for these popular SMTP servers:
47
47
  #
48
- # - Exim (<tt>bin/rails action_mailbox:ingress:exim)
49
- # - Postfix (<tt>bin/rails action_mailbox:ingress:postfix)
50
- # - Qmail (<tt>bin/rails action_mailbox:ingress:qmail)
48
+ # - Exim (<tt>bin/rails action_mailbox:ingress:exim</tt>)
49
+ # - Postfix (<tt>bin/rails action_mailbox:ingress:postfix</tt>)
50
+ # - Qmail (<tt>bin/rails action_mailbox:ingress:qmail</tt>)
51
51
  class Ingresses::Relay::InboundEmailsController < ActionMailbox::BaseController
52
52
  before_action :authenticate_by_password, :require_valid_rfc822_message
53
53
 
@@ -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)
@@ -25,12 +25,10 @@ module ActionMailbox
25
25
  # inbound_email.mail.from # => 'david@loudthinking.com'
26
26
  # inbound_email.source # Returns the full rfc822 source of the email as text
27
27
  class InboundEmail < Record
28
- self.table_name = "action_mailbox_inbound_emails"
29
-
30
28
  include Incineratable, MessageId, Routable
31
29
 
32
30
  has_one_attached :raw_email, service: ActionMailbox.storage_service
33
- enum status: %i[ pending processing delivered failed bounced ]
31
+ enum :status, %i[ pending processing delivered failed bounced ]
34
32
 
35
33
  def mail
36
34
  @mail ||= Mail.from_source(source)
@@ -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
10
+ MAJOR = 8
11
11
  MINOR = 1
12
- TINY = 5
13
- PRE = "2"
12
+ TINY = 2
13
+ PRE = "1"
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
@@ -32,7 +36,7 @@ module Mail
32
36
 
33
37
  private
34
38
  def address_list(obj)
35
- if obj&.respond_to?(:element)
39
+ if obj.respond_to?(:element)
36
40
  # Mail 2.8+
37
41
  obj.element
38
42
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmailbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.5.2
4
+ version: 8.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -16,126 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.1.5.2
19
+ version: 8.1.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.1.5.2
26
+ version: 8.1.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 7.1.5.2
33
+ version: 8.1.2.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 7.1.5.2
40
+ version: 8.1.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activestorage
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 7.1.5.2
47
+ version: 8.1.2.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 7.1.5.2
54
+ version: 8.1.2.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activejob
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 7.1.5.2
61
+ version: 8.1.2.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 7.1.5.2
68
+ version: 8.1.2.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: actionpack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 7.1.5.2
75
+ version: 8.1.2.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 7.1.5.2
82
+ version: 8.1.2.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mail
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.7.1
89
+ version: 2.8.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 2.7.1
97
- - !ruby/object:Gem::Dependency
98
- name: net-imap
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: net-pop
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: net-smtp
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
96
+ version: 2.8.0
139
97
  description: Receive and process incoming emails in Rails applications.
140
98
  email:
141
99
  - david@loudthinking.com
@@ -206,10 +164,10 @@ licenses:
206
164
  - MIT
207
165
  metadata:
208
166
  bug_tracker_uri: https://github.com/rails/rails/issues
209
- changelog_uri: https://github.com/rails/rails/blob/v7.1.5.2/actionmailbox/CHANGELOG.md
210
- documentation_uri: https://api.rubyonrails.org/v7.1.5.2/
167
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.2.1/actionmailbox/CHANGELOG.md
168
+ documentation_uri: https://api.rubyonrails.org/v8.1.2.1/
211
169
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
212
- source_code_uri: https://github.com/rails/rails/tree/v7.1.5.2/actionmailbox
170
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.2.1/actionmailbox
213
171
  rubygems_mfa_required: 'true'
214
172
  rdoc_options: []
215
173
  require_paths:
@@ -218,14 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
176
  requirements:
219
177
  - - ">="
220
178
  - !ruby/object:Gem::Version
221
- version: 2.7.0
179
+ version: 3.2.0
222
180
  required_rubygems_version: !ruby/object:Gem::Requirement
223
181
  requirements:
224
182
  - - ">="
225
183
  - !ruby/object:Gem::Version
226
184
  version: '0'
227
185
  requirements: []
228
- rubygems_version: 3.6.9
186
+ rubygems_version: 4.0.6
229
187
  specification_version: 4
230
188
  summary: Inbound email handling framework.
231
189
  test_files: []