Skip to content

rogal111/catch-all-delivery-method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catch-all-delivery-method

Catch-all delivery method with optional recipients whitelist.

Installation

Install the gem

git clone git://github.com/rogal111/catch-all-delivery-method.git
cd catch-all-delivery-method
gem build catch-all-delivery-method.gemspec
gem install catch-all-delivery-method-0.0.0.gem

or add it to your Gemfile

gem 'catch-all-delivery-method', '>=0.0.0', :git => 'git://github.com/rogal111/catch-all-delivery-method.git'

Setup

In config/environments/development.rb (or another environment) setup delivery_method:

config.action_mailer.delivery_method = :catch_all
config.action_mailer.catch_all_settings = {
    :recipient_email => 'main_tester@example.com', # required
    :whitelist => ['tester1@example.com','tester2@example.com'], # this line is optional
    
    ##put your standard SMTP settings here
      }

or in your mailer settings:

class MyMailer < ActionMailer::Base
  self.delivery_method = :catch_all
  self.catch_all_settings = Rails.configuration.action_mailer.smtp_settings.merge({
      :recipient_email => 'main_tester@example.com', # required
	  :whitelist => ['tester1@example.com','tester2@example.com'], # this line is optional
     })
   
   ####
   # rest of mailer code
   ####
end
   

About

Catch-all delivery method with optional recipients whitelist

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages