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

Allow overriding of recipients when using in staging environment #594

Closed
davidlibrera opened this issue Mar 30, 2021 · 2 comments
Closed

Comments

@davidlibrera
Copy link

davidlibrera commented Mar 30, 2021

In one of our staging environment we're working using real addresses and we should avoid sending them emails.
In ruby we usually use gems like RecipientInterceptor that allow to override all recipients (to, cc and bcc) with a custom list of addresses and setting the original ones in headers.

We have a PR ready that includes a new adapter RecipientReplacerAdapter that wraps the real adapter replacing all addresses.

config :my_app, MyApp.Mailer,
  adapter: Bamboo.RecipientReplacerAdapter,
  inner_adapter: Bamboo.SendGridAdapter,
  recipient_replacements: ["user-1@example.com", "user-2@example.com],
  ...

Could it be an interesting feature?

master...leanpanda-com:master

@maartenvanvliet
Copy link
Member

A feature to handle use cases such as these is already being worked on 😀

See: #591

@davidlibrera
Copy link
Author

Sorry, I've looked in Iusses and not in existing PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants