Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show SMTP envelope recipient when relevant #48782

Merged
merged 1 commit into from Nov 7, 2023

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Jul 21, 2023

Motivation

The SMTP envelope recipient usually reflects the To, Cc and Bcc email headers. The mailer preview only shows SMTP the envelope recipient (SMTP-To) if it differs from To, but it does not take Cc and Bcc into account.

Screenshot:
image

Detail

This Pull Request extends the check for SMTP-To to cover also Cc and Bcc, so it is only displayed in the rare event that the envelope recipient has been manually overriden.

Also, show the list of email addresses without array brackets and quotes.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@rails-bot rails-bot bot added the railties label Jul 21, 2023
@c960657 c960657 changed the title Preview smtp envelope Only show SMTP envelope recipient when relevant Jul 25, 2023
@c960657
Copy link
Contributor Author

c960657 commented Nov 7, 2023

Thank you for your review and improvements.

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
@jonathanhefner jonathanhefner merged commit 0157819 into rails:main Nov 7, 2023
4 checks passed
@jonathanhefner
Copy link
Member

I pushed a commit to squash the commits.

Thank you, @c960657! ✉️

@c960657 c960657 deleted the preview-smtp-envelope branch November 7, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants