diff --git a/app/models/mailer.rb b/app/models/mailer.rb index c4bba852..b99e211d 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -387,7 +387,7 @@ class Mailer < ActionMailer::Base # Removes the current user from the recipients and cc # if he doesn't want to receive notifications about what he does @author ||= User.current - if @author.pref[:no_self_notified] + if @author && @author.mail && @author.pref[:no_self_notified] recipients((recipients.is_a?(Array) ? recipients : [recipients]) - [@author.mail]) if recipients.present? cc((cc.is_a?(Array) ? cc : [cc]) - [@author.mail]) if cc.present? end