forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rails#53513 from Mr0grog/reply-to-address-mail-ext…
…ension actionmailbox: Add `reply_to_address` Mail extension
- Loading branch information
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
* Add `reply_to_address` extension method on `Mail::Message`. | ||
|
||
*Mr0grog* | ||
|
||
Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/actionmailbox/CHANGELOG.md) for previous changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ class AddressesTest < ActiveSupport::TestCase | |
setup do | ||
@mail = Mail.new \ | ||
from: "[email protected]", | ||
reply_to: "[email protected]", | ||
to: "[email protected]", | ||
cc: "[email protected]", | ||
bcc: "[email protected]", | ||
|
@@ -18,6 +19,10 @@ class AddressesTest < ActiveSupport::TestCase | |
assert_equal "example.com", @mail.from_address.domain | ||
end | ||
|
||
test "reply to address uses address object" do | ||
assert_equal "example.com", @mail.reply_to_address.domain | ||
end | ||
|
||
test "recipients include everyone from to, cc, bcc, x-original-to, and x-forwarded-to" do | ||
assert_equal %w[ [email protected] [email protected] [email protected] [email protected] [email protected] ], @mail.recipients | ||
end | ||
|