mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: bounced email can contain multiple status codes
This commit is contained in:
parent
7ca2e6a80c
commit
ceb7590bcb
3 changed files with 49 additions and 1 deletions
|
@ -169,7 +169,7 @@ module Email
|
|||
|
||||
email ||= @from_email
|
||||
|
||||
if @mail.error_status.present? && @mail.error_status.start_with?("4.")
|
||||
if @mail.error_status.present? && Array.wrap(@mail.error_status).any? { |s| s.start_with?("4.") }
|
||||
Email::Receiver.update_bounce_score(email, SiteSetting.soft_bounce_score)
|
||||
else
|
||||
Email::Receiver.update_bounce_score(email, SiteSetting.hard_bounce_score)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue