{"id":13747501,"url":"https://github.com/dtaniwaki/mandriller","last_synced_at":"2025-11-11T19:37:00.637Z","repository":{"id":18170826,"uuid":"21281283","full_name":"dtaniwaki/mandriller","owner":"dtaniwaki","description":"Mandrill SMTP API integration for ActionMailer","archived":false,"fork":false,"pushed_at":"2022-12-27T02:59:55.000Z","size":48,"stargazers_count":124,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-12T12:45:58.642Z","etag":null,"topics":["email","mandrill","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtaniwaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-27T16:00:09.000Z","updated_at":"2024-02-05T10:53:32.000Z","dependencies_parsed_at":"2023-01-13T19:41:23.399Z","dependency_job_id":null,"html_url":"https://github.com/dtaniwaki/mandriller","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fmandriller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fmandriller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fmandriller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtaniwaki%2Fmandriller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtaniwaki","download_url":"https://codeload.github.com/dtaniwaki/mandriller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","mandrill","rails","ruby"],"created_at":"2024-08-03T06:01:31.528Z","updated_at":"2025-11-11T19:36:55.617Z","avatar_url":"https://github.com/dtaniwaki.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# mandriller\n\n[![Gem Version][gem-image]][gem-link]\n[![Dependency Status][deps-image]][deps-link]\n[![Build Status][build-image]][build-link]\n[![Coverage Status][cov-image]][cov-link]\n[![Code Climate][gpa-image]][gpa-link]\n\n[Mandrill](http://mandrill.com/) SMTP API integration for ActionMailer.\nSee detail of the protocol on [the official page](http://help.mandrill.com/entries/21688056-Using-SMTP-Headers-to-customize-your-messages).\n\n## Installation\n\nAdd the mandriller gem to your Gemfile.\n\n```ruby\ngem \"mandriller\"\n```\n\nAnd run `bundle install`.\n\nAdd the following into any environment's settings in `config/environments/`.\n\n```ruby\nconfig.action_mailer.delivery_method = :smtp\nconfig.action_mailer.smtp_settings = {\n  :user_name =\u003e 'UserName',\n  :password =\u003e 'Password',\n  :address =\u003e \"smtp.mandrillapp.com\",\n  :domain =\u003e \"your-domain.com\",\n  :enable_starttls_auto =\u003e true,\n  :authentication =\u003e 'login',\n  :port =\u003e 587,\n}\n```\n\n## Usage\n\ne.g.\n\n```ruby\nclass UserMailer \u003c Mandriller::Base\n  include AbstractController::Callbacks # To use before_filter in ActionMailer::Base\n\n  set_open_track\n  set_click_track\n  set_google_analytics [Settings.root_host, Settings.admin.host].uniq\n\n  before_filter do\n    set_google_analytics_campaign \"#{mailer_name.gsub(/_mailer$/, '')}/#{action_name.gsub(/_email$/, '')}\"\n  end\n\n  def test_mail\n    mail from: 'from@example.com', to: 'to@example.com'\n  end\nend\n```\n\nYou 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.\n\n## Settings\n\n### set_open_track\n\nEnable open-tracking for the message.\n\n- `set_open_track` or `set_open_track true`: Enable\n- `set_open_track false`: Disable\n\n### set_click_track\n\nEnable click-tracking for the message.\n\n- `set_click_track 'all'`: enables click tracking on all emails\n- `set_click_track 'htmlonly'`: enables click tracking only on html emails\n- `set_click_track 'textonly'`: enables click tracking only on text emails\n\n### set_auto_text\n\nAutomatically generate a plain-text version of the email from the HTML content.\n\n- `set_auto_text` or `set_auto_text true`: Enable\n- `set_auto_text false`: Disable\n\n### set_auto_html\n\nAutomatically generate an HTML version of the email from the plain-text content.\n\n- `set_auto_html` or `set_auto_html true`: Enable\n- `set_auto_html false`: Disable\n\n### set_template\n\nUse an HTML template stored in your Mandrill account\n\n- `set_template 'template_name'` or `set_template 'template_name', 'block_name'`: \n\n`template_name`\n\nthe name of the stored template.\n\n`block_name`\n\nthe name of the mc:edit region where the body of the SMTP generated message will be placed. Optional and defaults to \"main\".\n\n### set_merge_vars\n\nAdd dynamic data to replace mergetags that appear in your message content.\n\n- `set_merge_vars foo: 1, bar: 2`\n\n### set_google_analytics\n\nAdd Google Analytics tracking to links in your email for the specified domains.\n\n- `set_google_analytics ['foo.com', 'bar.com'`]\n\n### set_google_analytics_campaign\n\nAdd an optional value to be used for the __utm_campaign parameter__ in Google Analytics tracked links.\n\n- `set_google_analytics 'campaign_name'`\n\n### set_metadata\n\nInformation about any custom fields or data you want to append to the message.\n\n- `set_metadata foo: 1, bar: 2`\n\n### set_url_strip_qs\n\nWhether to strip querystrings from links for reporting.\n\n- `set_url_strip_qs` or `set_url_strip_qs true`: Enable\n- `set_url_strip_qs false`: Disable\n\n### set_preserve_recipients\n\nWhether to show recipients of the email other recipients, such as those in the \"cc\" field.\n\n- `set_preserve_recipients` or `set_preserve_recipients true`: Enable\n- `set_preserve_recipients false`: Disable\n\n### set_inline_css\n\nWhether to inline the CSS for the HTML version of the email (only for HTML documents less than 256KB).\n\n- `set_inline_css` or `set_inline_css true`: Enable\n- `set_inline_css false`: Disable\n\n### set_tracking_domain\n\nSet a [custom domain to use for tracking opens and clicks](http://help.mandrill.com/entries/23353682-Can-I-customize-the-domain-used-for-open-and-click-tracking-) instead of mandrillapp.com.\n\n- `set_tracking_domain` or `set_tracking_domain true`: Enable\n- `set_tracking_domain false`: Disable\n\n### set_signing_domain\n\nSet a [custom domain to use for SPF/DKIM signing](http://help.mandrill.com/entries/23374656-Can-I-send-emails-on-behalf-of-my-clients-) instead of mandrill (for \"via\" or \"on behalf of\" in email clients).\n\n- `set_signing_domain` or `set_signing_domain true`: Enable\n- `set_signing_domain false`: Disable\n\n### set_subaccount\n\nSelect a [subaccount](http://help.mandrill.com/entries/25523278-What-are-subaccounts-) for sending the mail.\n\n- `set_subaccount 'subaccount_id'`\n\n### set_view_content_link\n\nControl whether the View Content link appears for emails sent for your account.\n\n- `set_view_content_link` or `set_view_content_link true`: Enable\n- `set_view_content_link false`: Disable\n\n### set_bcc_address\n\nAn optional address that will receive an exact copy of the message, including all tracking data\n\n- `set_bcc_address 'email_address'`\n\n### set_important\n\nWhether this message is [important](http://help.mandrill.com/entries/23664027-Does-Mandrill-allow-me-to-prioritize-messages-) and should be delivered ahead of non-important messages\n\n- `set_important` or `set_important true`: Enable\n- `set_important false`: Disable\n\n### set_ip_pool\n\nSpecify a [dedicated IP pool](http://help.mandrill.com/entries/24182062-Can-I-choose-which-dedicated-IP-pool-my-Mandrill-emails-send-from-) for the message.\n\n- `set_ip_pool 'dedicated_ip_pool'`\n\n### set_return_path_domain\n\nSpecify a [custom domain](http://help.mandrill.com/entries/25241243-Can-I-customize-the-Return-Path-bounce-address-used-for-my-emails-) to use for the message's return-path\n\n- `set_return_path_domain 'example.com'`\n\n### set_send_at\n\nSpecify a future date/time that the message should be [scheduled](http://help.mandrill.com/entries/24331201-Can-I-schedule-a-message-to-send-at-a-specific-time-) for delivery\n\n- `set_send_at 5.days.from_now`\n\n__Only available for paid accounts__\n\n### set_tags\n\nAdd tags to your emails.\n\n- `set_tags ['tag1', 'tag2'`]\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2014 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.\n\n\n\n[gem-image]:   https://badge.fury.io/rb/mandriller.svg\n[gem-link]:    http://badge.fury.io/rb/mandriller\n[build-image]: https://secure.travis-ci.org/dtaniwaki/mandriller.png?branch=master\n[build-link]:  http://travis-ci.org/dtaniwaki/mandriller?branch=master\n[deps-image]:  https://gemnasium.com/dtaniwaki/mandriller.svg?branch=master\n[deps-link]:   https://gemnasium.com/dtaniwaki/mandriller?branch=master\n[cov-image]:   https://coveralls.io/repos/dtaniwaki/mandriller/badge.png?branch=master\n[cov-link]:    https://coveralls.io/r/dtaniwaki/mandriller?branch=master\n[gpa-image]:   https://codeclimate.com/github/dtaniwaki/mandriller.png?branch=master\n[gpa-link]:    https://codeclimate.com/github/dtaniwaki/mandriller?branch=master\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtaniwaki%2Fmandriller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtaniwaki%2Fmandriller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtaniwaki%2Fmandriller/lists"}