All Projects → ohmysmtp → ohmysmtp-rails

ohmysmtp / ohmysmtp-rails

Licence: MIT license
A plugin for ActionMailer to send emails via MailPace.com

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to ohmysmtp-rails

smtp-client
SMTP Client Library in C
Stars: ✭ 68 (+119.35%)
Mutual labels:  smtp-client, smtp-mail
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
Stars: ✭ 298 (+861.29%)
Mutual labels:  smtp-client, smtp-mail
go-smtp-mock
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
Stars: ✭ 76 (+145.16%)
Mutual labels:  smtp-server, smtp-mail
Sendgrid Python
The Official Twilio SendGrid Led, Community Driven Python API Library
Stars: ✭ 1,125 (+3529.03%)
Mutual labels:  transactional-emails
Suet
An analytics dashboard and reporting tool for Mailgun and Amazon SES transactional emails.
Stars: ✭ 114 (+267.74%)
Mutual labels:  transactional-emails
ControlCenter
Mirrored from GitLab! Monitoring and automation for Open Source email servers, starting with Postfix. Please do not submit issues or PRs here - join us at: https://gitlab.com/lightmeter
Stars: ✭ 88 (+183.87%)
Mutual labels:  smtp-server
sarlacc
SMTP server / sinkhole for collecting spam
Stars: ✭ 42 (+35.48%)
Mutual labels:  smtp-server
Cuttlefish
Transactional email server with a lovely web interface
Stars: ✭ 985 (+3077.42%)
Mutual labels:  transactional-emails
squirrelmail
🌰️🐿️ SquirrelMail GitHub Repository (PHP 7-OK!)
Stars: ✭ 42 (+35.48%)
Mutual labels:  smtp-client
smtprelay
Simple Golang SMTP relay/proxy server
Stars: ✭ 270 (+770.97%)
Mutual labels:  smtp-server
Sendgrid Nodejs
The Official Twilio SendGrid Led, Community Driven Node.js API Library
Stars: ✭ 2,543 (+8103.23%)
Mutual labels:  transactional-emails
Mailjet Gem
[API v3] Mailjet official Ruby GEM
Stars: ✭ 119 (+283.87%)
Mutual labels:  transactional-emails
PyEmailer
Send Emails In One Click With Python.
Stars: ✭ 29 (-6.45%)
Mutual labels:  smtp-server
Sendgrid Php
The Official Twilio SendGrid Led, Community Driven PHP API Library
Stars: ✭ 1,257 (+3954.84%)
Mutual labels:  transactional-emails
SimpleKotlinMail
A simple, coroutine based Kotlin Email API for both client- and server-side projects
Stars: ✭ 56 (+80.65%)
Mutual labels:  smtp-server
Mailjet Apiv3 Java
[API v3] Mailjet Java API Wrapper
Stars: ✭ 53 (+70.97%)
Mutual labels:  transactional-emails
enough mail
IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Stars: ✭ 78 (+151.61%)
Mutual labels:  smtp-client
Mailjet Apiv3 Php
[API v3] Mailjet PHP Wrapper
Stars: ✭ 194 (+525.81%)
Mutual labels:  transactional-emails
Laravel Postmark
A Postmark adapter for Laravel
Stars: ✭ 143 (+361.29%)
Mutual labels:  transactional-emails
mailamie
🌈 Mailamie is a simple SMTP catch all server for testing written in PHP.
Stars: ✭ 73 (+135.48%)
Mutual labels:  smtp-server

MailPace::Rails

License: MIT Gem Version MailPace Rails

MailPace lets you send transactional emails from your app over an easy to use API.

The MailPace Rails Gem is a plug in for ActionMailer to send emails via MailPace to make sending emails from Rails apps super simple.

New in 0.3.0: The ability to consume inbound emails from MailPace via ActionMailbox

Usage

Once installed and configured, continue to send emails using ActionMailer and receive emails with ActionMailbox like normal.

Other Requirements

You will need an MailPace account with a verified domain and organization with an active plan.

Installation

Account Setup

Set up an account at MailPace and complete the Onboarding steps

Gem Installation

Add this line to your application's Gemfile:

gem 'mailpace-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mailpace-rails

Configure the Gem

First you will need to retrieve your API token for your sending domain from MailPace. You can find it under Organization -> Domain -> API Tokens.

Use the encrypted secret management to save your API Token to config/credentials.yml.enc by running the following:

rails secret
rails credentials:edit

Then add your token:

mailpace_api_token: "TOKEN_GOES_HERE"

Set MailPace as your mail delivery method in config/application.rb:

config.action_mailer.delivery_method = :mailpace
config.action_mailer.mailpace_settings = { api_token: Rails.application.credentials.mailpace_api_token }

Tagging

You can tag messages and filter them later in the MailPace UI. To do this, pass the tags as a header by adding a tag variable to your mail method call.

class TestMailer < ApplicationMailer
  default from: '[email protected]',
          to: '[email protected]'

  def single_tag
    mail(
      tags: 'test tag' # One tag
    )
  end

  def multi_tag
    mail(
      tags: "['test tag', 'another-tag']" # Multiple tags
    )
  end
end

Note that this should always be a string, even if using an array of multiple tags.

List-Unsubscribe

To add a List-Unsubscribe header, pass a list_unsubscribe string to the mail function:

class TestMailer < ApplicationMailer
  default from: '[email protected]',
          to: '[email protected]'

  def list_unsub_header
    mail(
      list_unsubscribe: 'https://listunsublink.com'
    )
  end
end

ActionMailbox (for receiving inbound emails)

As of v0.3.0, this Gem supports handling Inbound Emails (see https://docs.mailpace.com/guide/inbound/ for more details) via ActionMailbox. To set this up:

  1. Tell Action Mailbox to accept emails from MailPace in config/environments/production.rb
config.action_mailbox.ingress = :mailpace
  1. Generate a strong password that Action Mailbox can use to authenticate requests to the MailPace ingress. Use bin/rails credentials:edit to add the password to your application's encrypted credentials under action_mailbox.ingress_password, where Action Mailbox will automatically find it:
action_mailbox:
  ingress_password: ...

Alternatively, provide the password in the RAILS_INBOUND_EMAIL_PASSWORD environment variable.

  1. Configure MailPace to forward inbound emails to /rails/action_mailbox/mailpace/inbound_emails with the username actionmailbox and the password you previously generated. If your application lived at https://example.com you would configure your MailPace inbound endpoint URL with the following fully-qualified URL:

https://actionmailbox:[email protected]/rails/action_mailbox/mailpace/inbound_emails

That's it! Emails should start flowing into your app just like magic.

Support

For support please check the MailPace Documentation or contact us at [email protected]

Contributing

Please ensure to add a test for any change you make. To run the tests:

bin/test

Pull requests always welcome

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].