Chatwoot/app/mailers/administrator_notifications/channel_notifications_mailer.rb
2020-10-28 00:22:57 +05:30

10 lines
440 B
Ruby

class AdministratorNotifications::ChannelNotificationsMailer < ApplicationMailer
def slack_disconnect(account)
return unless smtp_config_set_or_development?
emails = account.administrators.pluck(:email)
subject = 'Your Slack integration has expired'
@action_url = "#{ENV['FRONTEND_URL']}/app/accounts/#{account.id}/settings/integrations/slack"
send_mail_with_liquid(to: emails, subject: subject) and return
end
end