mirror of
https://github.com/Evolix/chexpire.git
synced 2024-05-05 18:25:09 +02:00
ea610ee185
This is not dependent of Notificatioon model.
26 lines
678 B
Ruby
26 lines
678 B
Ruby
module Notifier
|
|
module Channels
|
|
class Email < Base
|
|
# Error notifications - all checks grouped by user
|
|
def notify_recurrent_failures(user, checks)
|
|
NotificationsMailer.recurrent_failures(user, checks).deliver_now
|
|
end
|
|
|
|
protected
|
|
|
|
def supports?(_notification)
|
|
true
|
|
end
|
|
|
|
# Expiration notifications
|
|
def domain_notify_expires_soon(notification)
|
|
NotificationsMailer.with(notification: notification).domain_expires_soon.deliver_now
|
|
end
|
|
|
|
def ssl_notify_expires_soon(notification)
|
|
NotificationsMailer.with(notification: notification).ssl_expires_soon.deliver_now
|
|
end
|
|
end
|
|
end
|
|
end
|