Project

mailpy

0.01
Low commit activity in last 3 years
Action Mailer Adapter for Send Email Through HTTP APIs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Mailpy

Action Mailer Adapter for Sending Email Through HTTP APIs. Mailpy will automatically switch to SMTP method in case your mailer server encounter any problem.

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem 'mailpy'

Add configuration to your application environments. development.rb, staging.rb, or production.rb

config.action_mailer.delivery_method = :mailpy
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.mailpy_settings = {
	endpoint: ENV['MAILER_API_ENDPOINT'],
	headers: {
	  Authorization: ENV['MAILER_API_KEY_OR_AUTH_TOKEN']
	}
}
config.action_mailer.smtp_settings = {
	address: ENV['SMTP_ADDRESS'],
	port: ENV['SMTP_PORT'],
	domain: ENV['SMTP_DOMAIN'],
	authentication: ENV['SMTP_AUTHENTICATION_METHOD'],
	user_name: ENV['SMTP_USERNAME'],
	password: ENV['SMTP_PASSWORD'],
	enable_starttls_auto: true,
	openssl_verify_mode: 'none'
}

And then execute:

$ bundle

Or install it yourself as:

$ gem install mailpy

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.