dmails: send email notifications in background job.

This commit is contained in:
evazion
2020-03-14 19:33:28 -05:00
parent 0ef9d6e417
commit dc1742321d
3 changed files with 9 additions and 18 deletions

View File

@@ -149,7 +149,7 @@ class Dmail < ApplicationRecord
def send_email
if is_recipient? && !is_deleted? && to.receive_email_notifications? && to.can_receive_email?
UserMailer.dmail_notice(self).deliver_now
UserMailer.dmail_notice(self).deliver_later
end
end