FIX: Allow sending test e-mails to any email address when disable_email is set to non-staff (#6792)

This commit is contained in:
Rishabh
2018-12-18 20:42:05 +05:30
committed by Régis Hanol
parent 32784ad11a
commit c279792130
5 changed files with 5 additions and 12 deletions

View File

@ -30,10 +30,6 @@ module Email
return skip(SkippedEmailLog.reason_types[:sender_message_blank]) if @message.blank?
return skip(SkippedEmailLog.reason_types[:sender_message_to_blank]) if @message.to.blank?
if SiteSetting.disable_emails == "non-staff"
return unless User.find_by_email(to_address)&.staff?
end
if @message.text_part
if @message.text_part.body.to_s.blank?
return skip(SkippedEmailLog.reason_types[:sender_text_part_body_blank])