dmails: send email notifications in background job.

This commit is contained in:
evazion
2020-03-14 21:06:29 -05:00
parent 0ef9d6e417
commit dc1742321d
3 changed files with 9 additions and 18 deletions
+1 -1
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