mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #2486 from riking/no_group_messages
Change pop3 auth errors from admin message to dashboard notice
This commit is contained in:
@@ -47,7 +47,7 @@ module Jobs
|
||||
client_message = RejectionMailer.send_rejection(message.from, message.body, message.to, message_template)
|
||||
Email::Sender.new(client_message, message_template).send
|
||||
else
|
||||
Discourse.handle_exception(e, { context: "incoming email", mail: mail_string })
|
||||
Discourse.handle_exception(e, { code: "unknown error for incoming email", mail: mail_string} )
|
||||
end
|
||||
ensure
|
||||
mail.delete
|
||||
@@ -70,9 +70,7 @@ module Jobs
|
||||
pop.finish
|
||||
end
|
||||
rescue Net::POPAuthenticationError => e
|
||||
# inform admins about the error (1 message per hour to prevent too much SPAM)
|
||||
data = { limit_once_per: 1.hour, message_params: { error: e }}
|
||||
GroupMessage.create(Group[:admins].name, :email_error_notification, data)
|
||||
Discourse.handle_exception(e, { code: "signing in for incoming email" } )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user