mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:01:26 +08:00
FIX: Handle incoming emails without email address in From header (#5177)
This commit is contained in:

committed by
Régis Hanol

parent
6831efe2e9
commit
31ecb4fecf
@ -36,6 +36,7 @@ module Email
|
||||
def handle_failure(mail_string, e, incoming_email)
|
||||
message_template = case e
|
||||
when Email::Receiver::EmptyEmailError then :email_reject_empty
|
||||
when Email::Receiver::NoSenderDetectedError then :email_reject_empty
|
||||
when Email::Receiver::NoBodyDetectedError then :email_reject_empty
|
||||
when Email::Receiver::UserNotFoundError then :email_reject_user_not_found
|
||||
when Email::Receiver::ScreenedEmailError then :email_reject_screened_email
|
||||
@ -52,7 +53,7 @@ module Email
|
||||
when ActiveRecord::Rollback then :email_reject_invalid_post
|
||||
when Email::Receiver::InvalidPostAction then :email_reject_invalid_post_action
|
||||
when Discourse::InvalidAccess then :email_reject_invalid_access
|
||||
else :email_reject_unrecognized_error
|
||||
else :email_reject_unrecognized_error
|
||||
end
|
||||
|
||||
template_args = {}
|
||||
|
Reference in New Issue
Block a user