Send rejection email for unrecognised errors

Sure:

Unrecognized error type (RuntimeError: ) when processing incoming email

Backtrace:
  /var/www/discourse/lib/discourse.rb:26:in `execute_command'
  /var/www/discourse/lib/upload_creator.rb:137:in `convert_to_jpeg!'
  /var/www/discourse/lib/upload_creator.rb:42:in `block in create_for'
  /var/www/discourse/lib/distributed_mutex.rb:21:in `synchronize'
  /var/www/discourse/lib/distributed_mutex.rb:5:in `synchronize'
  /var/www/discourse/lib/upload_creator.rb:34:in `create_for'
  /var/www/discourse/lib/email/receiver.rb:580:in `block in create_post_with_attachments'
  /var/www/discourse/lib/email/receiver.rb:573:in `each'
  /var/www/discourse/lib/email/receiver.rb:573:in `create_post_with_attachments'
  /var/www/discourse/lib/email/receiver.rb:551:in `create_reply'
  /var/www/discourse/lib/email/receiver.rb:101:in `process_internal'
  /var/www/discourse/lib/email/receiver.rb:50:in `block in process!'
  /var/www/discourse/lib/distributed_mutex.rb:21:in `synchronize'
  /var/www/discourse/lib/distributed_mutex.rb:5:in `synchronize'
  /var/www/discourse/lib/email/receiver.rb:45:in `process!'
  /var/www/discourse/lib/email/processor.rb:17:in `process!'
  /var/www/discourse/lib/email/processor.rb:11:in `process!'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:25:in `process_popmail'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:43:in `block (2 levels) in poll_pop3'
  /usr/local/lib/ruby/2.4.0/net/pop.rb:689:in `block in delete_all'
  /usr/local/lib/ruby/2.4.0/net/pop.rb:688:in `each'
  /usr/local/lib/ruby/2.4.0/net/pop.rb:688:in `delete_all'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `block in poll_pop3'
  /usr/local/lib/ruby/2.4.0/net/pop.rb:532:in `start'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
  /var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

It’s a weird one, and I tried to reproduce it with the same image, but couldn’t. When the user resent the email it worked fine.

@zogstrip I’ll PM you the full logs, with the raw email.

Precisely, and why I put this in #feature rather than #bug.

As an email-only user, I want Discourse to alert me whenever my email doesn’t result in a post on Discourse, so that I know that my colleagues aren’t just ignoring me.

2 Likes