fixes #2850: NoMethodError exception when sending DMail

This commit is contained in:
r888888888
2017-01-20 12:37:43 -08:00
parent fa94eafef3
commit e80096bf19

View File

@@ -193,7 +193,7 @@ class Dmail < ActiveRecord::Base
end
def send_dmail
if to.receive_email_notifications? && to.email.include?("@") && owner_id == to.id
if to.receive_email_notifications? && to.email =~ /@/ && owner_id == to.id
UserMailer.dmail_notice(self).deliver_now
end
end