# Error polling for reply emails

**URL:** https://meta.discourse.org/t/error-polling-for-reply-emails/28207
**Category:** Bug
**Created:** [2015年五月1日 17:46 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207 "2015-05-01T17:46:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![louisd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/louisd/32/41683_2.png) [@louisd](https://meta.discourse.org/u/louisd)
#### Post date: [2015年五月1日 17:46 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207/1 "2015-05-01T17:46:46Z")

</div>

I’m trying to setup replying by email for my Discourse installation. Whenever it polls the pop3 server it raises the exception `Job exception: Reserved key in template arguments`. I’m not sure [which of the disallowed args](https://github.com/discourse/discourse/blob/master/app/mailers/rejection_mailer.rb#L6-L12) is causing the error and how I would accidentally be including those. The only settings I’ve changed are the ones I needed to in Admin-\>Settings-\>Email

Here’s the trace:

```plaintext
/var/www/discourse/app/mailers/rejection_mailer.rb:23:in `send_rejection'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:189:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:82:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:136:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.1.10/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.1.10/lib/action_mailer/base.rb:580:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.1.10/lib/action_mailer/base.rb:577:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.1.10/lib/action_mailer/base.rb:568:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.1.10/lib/action_mailer/base.rb:551:in `new'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.1.10/lib/action_mailer/base.rb:551:in `method_missing'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:77:in `handle_failure'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:27:in `rescue in handle_mail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:30:in `handle_mail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:91:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:665:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:665:in `each_mail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:90:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:88:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:18:in `execute'
/var/www/discourse/app/jobs/base.rb:153:in `block (2 levels) in perform'

```

Thanks for any insight or help!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年五月2日 02:34 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207/2 "2015-05-02T02:34:49Z")

</div>

Can you post the site setting strings in question you are using, minus password?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年五月2日 21:45 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207/3 "2015-05-02T21:45:55Z")

</div>

@techapj, this is “your” bug:

[https://github.com/discourse/discourse/commit/a80c742855a9155f5a0f73b1eee2134c63da2ed0](https://github.com/discourse/discourse/commit/a80c742855a9155f5a0f73b1eee2134c63da2ed0)

> <https://github.com/discourse/discourse/blob/a80c742855a9155f5a0f73b1eee2134c63da2ed0/app/jobs/scheduled/poll_mailbox.rb#L72-L74>

> <https://github.com/discourse/discourse/blob/main/app/mailers/rejection_mailer.rb#L6-L7>

Something tells me this wasn’t tested 😉

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2015年五月4日 05:55 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207/4 "2015-05-04T05:55:03Z")

</div>

Oops! Fixed now:

[https://github.com/discourse/discourse/pull/3427](https://github.com/discourse/discourse/pull/3427)

(also added the test case 😊)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年五月4日 06:23 UTC](https://meta.discourse.org/t/error-polling-for-reply-emails/28207/5 "2015-05-04T06:23:57Z")

</div>


