MailPlugger helps you to use one or more mail providers. You can send emails via SMTP and API as well.
Also, it can help:
- move between mail providers
- load balancing
- cost management
Installation
Add this line to your application's Gemfile:
gem 'mail_plugger'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install mail_plugger
Documentation
What is MailPlugger?
It is a Ruby library that provides a specialized mail delivery method with various configuration options. It can be utilized with Ruby on Rails as well as other solutions.
Why should I use MailPlugger?
- It supports more mail providers.
- It has built-in sending strategies, such as
plugged_in_first
,random
, andround_robin
, which are useful if you have multiple mail providers. - Your code for the mailers can remain simple and clean.
- Switching mail providers can be a quick and easy process.
How Tos
- How to use MailPlugger.configure method
- How to use MailPlugger.plug_in method
- How to use MailPlugger::DeliveryMethod class
- How to use MailPlugger in a Ruby script or IRB console
-
How to use MailPlugger in Ruby on Rails
- How to use MailPlugger.configure method in Ruby on Rails
- How to use more SMTP delivery systems in Ruby on Rails
- How to combine SMTP and API delivery systems in Ruby on Rails
- How to add API specific options to the mailer method in Ruby on Rails
- How to use the API delivery system that adds attachments to the mailer method in Ruby on Rails
- How to use more API delivery systems in Ruby on Rails
- How to use one API delivery system with more send methods in Ruby on Rails
- How to use AWS SES API with MailPlugger in Ruby on Rails
- How to use SparkPost API with MailPlugger in Ruby on Rails
- How to use SendGrid API with MailPlugger in Ruby on Rails
- How to use Mandrill API with MailPlugger in Ruby on Rails
- How to use Postmark API with MailPlugger in Ruby on Rails
- How to use Mailgun API with MailPlugger in Ruby on Rails
FakePlugger is a delivery method to mock MailPlugger. It works similarly to MailPlugger, but it won't send any emails (if we would like to, it is possible to send the email, but we should do it manually). Also, it can write out debug information, or we can manipulate the response with it. Another option that we can use MailGrabber web interface if the delivery method is :fake_plugger
.
Documentation
How Tos
- How to use FakePlugger::DeliveryMethod class
- How to use FakePlugger in a Ruby script or IRB console
- How to use FakePlugger in Ruby on Rails
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
To release a new version:
- Update CHANGELOG.md
- Update the version number in
version.rb
manually or use thegem-release
gem and rungem bump -v major|minor|patch|rc|beta
. - Build gem with
bundle exec rake build
. - Run
bundle install
andbundle exec appraisal install
to update gemfiles and commit the changes. - Run
bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the.gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome. Please read CONTRIBUTING.md if you would like to contribute to this project.
Inspiration
- T-mailer
- Mandrill DM
- SparkPost Rails
- and other solutions regarding in this topic
License
The gem is available as open source under the terms of the MIT License.