All Projects → dtaniwaki → Mandriller

dtaniwaki / Mandriller

Licence: mit
Mandrill SMTP API integration for ActionMailer

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Mandriller

Letter opener web
A web interface for browsing Ruby on Rails sent emails
Stars: ✭ 513 (+313.71%)
Mutual labels:  rails, email
Email inquire
Validate email for common typos and one-time email providers
Stars: ✭ 257 (+107.26%)
Mutual labels:  rails, email
Email Dashboard
📪 An interactive emailing management service with scheduling, templating, tracking and A/B testing.
Stars: ✭ 194 (+56.45%)
Mutual labels:  rails, email
Premailer Rails
CSS styled emails without the hassle.
Stars: ✭ 1,382 (+1014.52%)
Mutual labels:  rails, email
Vite ruby
⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
Stars: ✭ 112 (-9.68%)
Mutual labels:  rails
N1 Ido
Ido is a clean, simple, Polymail-inspired theme for Mailspring
Stars: ✭ 118 (-4.84%)
Mutual labels:  email
Bootstrap form
Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
Stars: ✭ 1,532 (+1135.48%)
Mutual labels:  rails
Jsonapi.rb
Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
Stars: ✭ 116 (-6.45%)
Mutual labels:  rails
Closure tree
Easily and efficiently make your ActiveRecord models support hierarchies
Stars: ✭ 1,665 (+1242.74%)
Mutual labels:  rails
Globodns
Api to manage Bind Name Server
Stars: ✭ 122 (-1.61%)
Mutual labels:  rails
Slidehub
SlideHub is an Open Source Slide Sharing Application for Azure / AWS
Stars: ✭ 120 (-3.23%)
Mutual labels:  rails
Learn Ruby On Rails
為你自己學 Ruby on Rails
Stars: ✭ 119 (-4.03%)
Mutual labels:  rails
Repost
An open source software to communicate with your team members through posting daily reports.
Stars: ✭ 121 (-2.42%)
Mutual labels:  rails
Calculate All
calculate_all method for aggregate functions in Active Record
Stars: ✭ 118 (-4.84%)
Mutual labels:  rails
Zeyple
Postfix filter/hook to automatically encrypt outgoing emails with PGP/GPG
Stars: ✭ 122 (-1.61%)
Mutual labels:  email
Action Cable Signaling Server
🤝Rails implementation of a WebRTC Signaling Server
Stars: ✭ 118 (-4.84%)
Mutual labels:  rails
Fake api
The fastest way to prototype API in your Rails application
Stars: ✭ 119 (-4.03%)
Mutual labels:  rails
String template
A template engine for Rails, focusing on speed, using Ruby's String interpolation syntax
Stars: ✭ 122 (-1.61%)
Mutual labels:  rails
Mailjet Gem
[API v3] Mailjet official Ruby GEM
Stars: ✭ 119 (-4.03%)
Mutual labels:  email
Gitmail
📫 making networking a little easier
Stars: ✭ 119 (-4.03%)
Mutual labels:  email

mandriller

Gem Version Dependency Status Build Status Coverage Status Code Climate

Mandrill SMTP API integration for ActionMailer. See detail of the protocol on the official page.

Installation

Add the mandriller gem to your Gemfile.

gem "mandriller"

And run bundle install.

Add the following into any environment's settings in config/environments/.

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :user_name => 'UserName',
  :password => 'Password',
  :address => "smtp.mandrillapp.com",
  :domain => "your-domain.com",
  :enable_starttls_auto => true,
  :authentication => 'login',
  :port => 587,
}

Usage

e.g.

class UserMailer < Mandriller::Base
  include AbstractController::Callbacks # To use before_filter in ActionMailer::Base

  set_open_track
  set_click_track
  set_google_analytics [Settings.root_host, Settings.admin.host].uniq

  before_filter do
    set_google_analytics_campaign "#{mailer_name.gsub(/_mailer$/, '')}/#{action_name.gsub(/_email$/, '')}"
  end

  def test_mail
    mail from: '[email protected]', to: '[email protected]'
  end
end

You can set the options globally and locally. Locally set option overwrites the one globally set. Just add any settings necessary for your mailers from the list below.

Settings

set_open_track

Enable open-tracking for the message.

  • set_open_track or set_open_track true: Enable
  • set_open_track false: Disable

set_click_track

Enable click-tracking for the message.

  • set_click_track 'all': enables click tracking on all emails
  • set_click_track 'htmlonly': enables click tracking only on html emails
  • set_click_track 'textonly': enables click tracking only on text emails

set_auto_text

Automatically generate a plain-text version of the email from the HTML content.

  • set_auto_text or set_auto_text true: Enable
  • set_auto_text false: Disable

set_auto_html

Automatically generate an HTML version of the email from the plain-text content.

  • set_auto_html or set_auto_html true: Enable
  • set_auto_html false: Disable

set_template

Use an HTML template stored in your Mandrill account

  • set_template 'template_name' or set_template 'template_name', 'block_name':

template_name

the name of the stored template.

block_name

the name of the mc:edit region where the body of the SMTP generated message will be placed. Optional and defaults to "main".

set_merge_vars

Add dynamic data to replace mergetags that appear in your message content.

  • set_merge_vars foo: 1, bar: 2

set_google_analytics

Add Google Analytics tracking to links in your email for the specified domains.

  • set_google_analytics ['foo.com', 'bar.com']

set_google_analytics_campaign

Add an optional value to be used for the utm_campaign parameter in Google Analytics tracked links.

  • set_google_analytics 'campaign_name'

set_metadata

Information about any custom fields or data you want to append to the message.

  • set_metadata foo: 1, bar: 2

set_url_strip_qs

Whether to strip querystrings from links for reporting.

  • set_url_strip_qs or set_url_strip_qs true: Enable
  • set_url_strip_qs false: Disable

set_preserve_recipients

Whether to show recipients of the email other recipients, such as those in the "cc" field.

  • set_preserve_recipients or set_preserve_recipients true: Enable
  • set_preserve_recipients false: Disable

set_inline_css

Whether to inline the CSS for the HTML version of the email (only for HTML documents less than 256KB).

  • set_inline_css or set_inline_css true: Enable
  • set_inline_css false: Disable

set_tracking_domain

Set a custom domain to use for tracking opens and clicks instead of mandrillapp.com.

  • set_tracking_domain or set_tracking_domain true: Enable
  • set_tracking_domain false: Disable

set_signing_domain

Set a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients).

  • set_signing_domain or set_signing_domain true: Enable
  • set_signing_domain false: Disable

set_subaccount

Select a subaccount for sending the mail.

  • set_subaccount 'subaccount_id'

set_view_content_link

Control whether the View Content link appears for emails sent for your account.

  • set_view_content_link or set_view_content_link true: Enable
  • set_view_content_link false: Disable

set_bcc_address

An optional address that will receive an exact copy of the message, including all tracking data

  • set_bcc_address 'email_address'

set_important

Whether this message is important and should be delivered ahead of non-important messages

  • set_important or set_important true: Enable
  • set_important false: Disable

set_ip_pool

Specify a dedicated IP pool for the message.

  • set_ip_pool 'dedicated_ip_pool'

set_return_path_domain

Specify a custom domain to use for the message's return-path

  • set_return_path_domain 'example.com'

set_send_at

Specify a future date/time that the message should be scheduled for delivery

  • set_send_at 5.days.from_now

Only available for paid accounts

set_tags

Add tags to your emails.

  • set_tags ['tag1', 'tag2']

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.

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].