21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-26 12:18:48 +02:00
chexpire/app/services/notifier/channels/email.rb

22 lines
560 B
Ruby
Raw Normal View History

module Notifier
module Channels
class Email < Base
REASONS = %i[expires_soon recurrent_failures].freeze
protected
def supports?(reason, _notification)
REASONS.include?(reason)
end
def domain_notify_expires_soon(notification)
NotificationsMailer.with(notification: notification).domain_expires_soon.deliver_now
end
def domain_notify_recurrent_failures(notification)
NotificationsMailer.with(notification: notification).domain_recurrent_failures.deliver_now
end
end
end
end