Skip to content

mlitwiniuk/email_recipient_guard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmailRecipientGuard

By setting a config option you can configure your outgoing email to always go to the same address (useful for example for development or staging environments).

# turn off EmailRecipientGuard (default)
config.email_recipient = nil
# send all emails to test@example.com
config.email_recipient = "test@example.com"
# set the config in another place (for example an initializer)
Rails.application.config.email_recipient = "test@example.com"

## another possible options
## email_recipient needs to be set to make following work!
# send (as CC) to more recipients - second and following array 
# addresses will be set in CC header
config.email_recipient = ["test1@example.com", "test2@example.com"]
# prefix subject of outgoing emails
confir.email_subject_prefix = "[test_emails]"

EmailRecipientGuard is using an ActionMailer interceptor to change the message before sending. No guarantees that this works for you so please test for yourself!

License

MIT License. Copyright 2012 autohaus24 GmbH

About

email_recipient_guard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 96.5%
  • JavaScript 3.5%