Socket
Book a DemoInstallSign in
Socket

multi_smtp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi_smtp

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

MultiSMTP

Email delivery is a critical component of many web applications. Often third-party Email services can experience temporary downtime.

We can achieve automatic failover by overriding the default delivery method with the MultiSMTP class.

Installation

Add this line to your application's Gemfile:

gem "multi_smtp"

And then execute:

$ bundle

Configuration

Set the delivery method to :multi_smtp for each environment that should use the automatic failover.

# config/environments/{staging,production}.rb
ExampleApp::Application.configure do
  config.action_mailer.delivery_method = :multi_smtp
end

In an initializer configure the MultiSMTP class with an array of (1..N) SMTP Providers.

# config/initializers/multi_smtp.rb
sendgrid_settings = {
  address: 'smtp.sendgrid.net',
  authentication: :plain,
  domain: 'hoteltonight.com',
  password: ENV['SENDGRID_PASSWORD'],
  port: '587',
  user_name: ENV['SENDGRID_USERNAME'],
}

other_smtp_settings = {
  # Other SMTP settings
}

MultiSMTP.smtp_providers = [sendgrid_settings, other_smtp_settings]

Contributing

  • Fork it ( https://github.com/[my-github-username]/multi_smtp/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 04 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.