Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure delete bad email.

  • Loading branch information...
commit 908ae446025b2e4c62008097c7e90894373155c4 1 parent c0e0de9
@seven1m seven1m authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  script/inbox
View
3  script/inbox
@@ -50,12 +50,13 @@ Net::POP3.start(host, nil, username, password) do |pop|
begin
logger.info "receiving mail..."
Notifier.receive(email.pop)
- email.delete
rescue Exception => e
logger.error "Error receiving email at " + Time.now.to_s + "::: " + e.message + "\n----\n" + e.backtrace.to_s
backtrace = e.backtrace.is_a?(Array) ? e.backtrace.join("\n") : e.backtrace.to_s
logger.error(backtrace)
Notifier.simple_message(Setting.get(:contact, :bug_notification_email), '[OneBody] Email Error', e.message + "\n\n" + backtrace).deliver
+ ensure
+ email.delete
end
end
logger.info "Finished Mail Importer."
Please sign in to comment.
Something went wrong with that request. Please try again.