No commit activity in last 3 years
No release in over 3 years
This gem blocks duplicate emails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 4.2.11.3
 Project Readme

DupSendBlocker

This gem prevents duplicate mail and SMS messages from being sent. For example, it prevents batches from running multiple times or human errors.

Installing

Add to Gemfile

gem 'dup_send_blocker'

Install

bundle install

Copy and execute migration file

bundle exec rake dup_send_blocker:install:migrations
bundle exec rake db:migrate

Usage

# You can specify 3 labels.
# If you try to send the same label combination, it will be blocked.

labels = [
  "info",
  "2020-10-07",
  "U-1233"
]

begin
  DupSendBlocker.perform!(labels) do
    # Implement the sending process.
  end
rescue DupSendBlocker::BlockError
  # Implement the process when it has already been sent.
end