A gem that makes it easy to automatically unsubscribe from emails in Rails.
📭 Unsubscribe alternatives and similar gems
Based on the "Email" category.
Alternatively, view unsubscribe alternatives based on common mentions on social networks and blogs.
MailCatcher9.3 6.1 L5 📭 Unsubscribe VS MailCatcherCatches mail and serves it through a dream.
9.0 4.1 L4 📭 Unsubscribe VS MailA Really Ruby Mail Library
LetterOpener8.5 0.0 L5 📭 Unsubscribe VS LetterOpenerPreview mail in the browser instead of sending.
premailer-rails7.2 0.0 L5 📭 Unsubscribe VS premailer-railsCSS styled emails without the hassle.
Griddler7.0 0.0 L5 📭 Unsubscribe VS GriddlerSimplify receiving email in Rails
Roadie6.4 2.6 L5 📭 Unsubscribe VS RoadieMaking HTML emails comfortable for the Ruby rockstars
Ahoy Email6.1 5.7 L5 📭 Unsubscribe VS Ahoy EmailFirst-party email analytics for Rails
Pony6.1 0.0 L5 📭 Unsubscribe VS PonyThe express way to send mail from Ruby.
Mailman6.0 0.0 L5 📭 Unsubscribe VS MailmanAn incoming mail processing microframework in Ruby.
Sup5.9 5.6 L5 📭 Unsubscribe VS SupA curses threads-with-tags style email client (mailing list: [email protected])
MailForm5.7 0.0 L5 📭 Unsubscribe VS MailFormSend e-mail straight from forms in Rails with I18n, validations, attachments and request information.
Truemail5.7 3.7 📭 Unsubscribe VS Truemail🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
Maily4.9 0.0 📭 Unsubscribe VS Maily:mailbox: Rails Engine to preview emails in the browser
roadie-rails3.9 0.0 L5 📭 Unsubscribe VS roadie-railsMaking HTML emails comfortable for the Rails rockstars
Maktoub3.6 0.0 L5 📭 Unsubscribe VS MaktoubA simple newsletter engine for Rails
Incoming3.5 1.7 L5 📭 Unsubscribe VS IncomingIncoming! helps you receive email in your Rack apps.
Markerb3.2 0.0 L5 📭 Unsubscribe VS MarkerbAllows you to render multipart e-mails from a single template written in Markdown.
ActionMailer BalancerA Ruby gem to send your ActionMailer mail through one of several delivery methods, selected by weight.
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of 📭 Unsubscribe or a related project?
Automatically unsubscribe from emails in Rails.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install unsubscribe
Then run the installation commands:
rails g unsubscribe:install rails unsubscribe:install:migrations rails db:migrate
include Unsubscribe::Ownerto a
Modelmust have an
class User < ApplicationRecord include Unsubscribe::Owner end
User.first.mailer_subscriptions # => #<ActiveRecord::Associations::CollectionProxy [#<Unsubscribe::MailerSubscription>, #<Unsubscribe::MailerSubscription>] > User.first.subscribed_to_mailer? "MarketingMailer" # => true/false User.first.to_sgid_for_mailer_subscription # => #<SignedGlobalID:123 ...>
include Unsubscribe::Mailerto a
- Optionally call
unsubscribe_settingsto set a
description. This will be used in the unsubscribe page.
@recipientis an instance of whatever Class
include Unsubscribe::Ownerwas added to.
class MarketingMailer < ApplicationMailer include Unsubscribe::Mailer unsubscribe_settings name: "Marketing Emails", description: "Updates on promotions and sales." def promotion mail to: @recipient.email end end
- Call the
MarketingMailer.with( recipient: User.first ).promotion.deliver_now
Unsubscribe::MailerSubscription.first.action # => "Unsubscribe from"/"Subscribe to" Unsubscribe::MailerSubscription.first.call_to_action # => "Unsubscribe from Marketing Emails"/"Subscribe to Marketing Emails" Unsubscribe::MailerSubscription.first.description # => "Updates on promotions and sales." Unsubscribe::MailerSubscription.first.name # => "Marketing Emails"
- Add the
@unsubscribe_urllink to the
<%= link_to "Unsubscribe", @unsubscribe_url %>
⚙️ Customize Templates
rails g unsubscribe:views if you want to modify the existing templates.
The language used for
Unsubscribe::MailerSubscription#action can be translated.
# config/locales/en.yml en: unsubscribe: action: subscribe: "Subscribe to" unsubscribe: "Unsubscribe from"
If you'd like to open a PR please make sure the following things pass:
bin/rails test bundle exec standardrb
The gem is available as open source under the terms of the MIT License.
*Note that all licence references and agreements mentioned in the 📭 Unsubscribe README section above are relevant to that project's source code only.