Set up Reply via Email Support ✉

(Jeff Atwood) #1

So you’d like to set up reply via email support for your Discourse forum.

:mega: Reply via email is pre-configured and enabled by default on all hosted sites. The guide below only applies to those self-hosting.

Good news! Unlike outgoing email, which is completely unsuitable for typical consumer mail services like GMail, Outlook, Yahoo Mail, etc, incoming reply via-email tends to be extremely low volume. Unless you have a truly massive forum with a zillion people replying to notification emails, you are probably safe using, say, Gmail.

So here’s how to set it up using GMail as an example.

  1. Create a new GMail account. Assign it a username like or in my case, Give it a strong password.

  2. Log in to this account via Accept the terms of service, enter the CAPTCHA, load the default web interface. Maybe send a test email, receive a test email. Kick the tires.

  3. POP3s access is off by default in Gmail, so turn it on via Settings, Forwarding and POP/IMAP:

    All incoming emails will be retained by default – but you can tweak as needed.

  4. Visit the Discourse settings and check the Email tab.

  5. Change the following settings:

    • reply_by_email_address enter replies+%{reply_key}
    • pop3_polling_username enter
    • pop3_polling_password enter the password of that email account
    • pop3_polling_host set to
    • pop3_polling_enabled set to true
    • reply_by_email_enabled set to true

There is a certain amount of polling that goes on for this account, but we’ve set it to a low, safe volume – you can configure the polling intervial via the pop3 polling period setting.

We do assume that your email service supports plus addressing aka address tags, so check that before starting. GMail obviously does.

If everything is working, you should see the footer of all notification mails now tell you that you can reply either by visiting the website, or replying via email:

To respond, reply to this email or visit {topic URL} in your browser.

If things aren’t working:

  • check the /logs path on your Discourse in your web browser and look for email related error messages.

  • log into your mail account using your web browser and check for any errors or notifications.

Note: we have seen difficulties when signing up for a GMail account from a different country than your server is located in. For example, if you create the Gmail account from the UK, but the server is in the USA.

Note 2: If you are using a GMail account (e.g. or a Google Apps mailbox (e.g. a Google mailbox, you will need to enable “access from less secure apps” in Google Account settings. If not, you will receive a “POP3 authentication failed” error in Discourse. Access from “less secure apps” is disabled by default.

Replacing Mailing lists: Email-In
New: Reply via Email Support!
Mail Posting Configuration
Replied to private message email from
Configuring Reply via Email :e-mail:
How to Use Discourse as a Private Support/Ticket System
Transition from Listserv (lsoft) to Discourse
Using subject line for reply-by-email identifier
How should Discourse System Market itself?
Free Discourse forum hosting for community-friendly GitHub projects
Reply from Email
Confused about setting up reply by email
Email polling error with Google Apps
Webhook to forward posts to a mailinglist: best practice?
Prevent creation of staged user for emails with auto-xyz header
Email response doesn't appear on forum, no error in log
Some questions regarding to pop polling, wildcards and MX
What is "Mailing List mode"?
Customize the "reply to" address in new private message notification emails
Notification email cannot be the same as reply by email
People replies to the email notifications
Using discourse to replace buddypress groups and mailman (and phpBB)
Instant notification for every new topic/reply
Questions about using Discourse in a small (<10 people) community
Message 'receiver' not in view until they reply
How can I enable "reply to this email to respond"
I cant setup smtp. I tried everything
Email in to a private category
How to make custom mail server email polling work?
(Zafarnamah) #2

It would be great to see something similar for Amazon SES. The free tier lets you send 2,000 messages. After that it is ten cents for 1,000 messages. The pricing is here.

(Jeff Atwood) #3

Provided it works like pop3s it will work already, there is nothing else to do. We have discussed IMAP support in the past.

(Evaryont 🎆) #4

Is there documentation for setting this up with Mandrill? I already have Mandrill set up for outgoing email, and it would be convenient if I could use it for incoming as well.

(Jeff Atwood) #5

Mandrill is an email delivery service as far as I know, it cannot receive email.

(Kane York) #6

I’m not so sure…

(Evaryont 🎆) #7

Indeed – you set up a URL endpoint that will receive a webhook from Mandrill which will receive a JSON payload of the email.

There is the mandrill-rails gem that would help I’d imagine. Is this something you’d want in as a default plugin (since you do mention Mandrill in the setup guide) or as a separate plugin?

(Jeff Atwood) #8

That makes more sense as a Rube Goldberg machine!

Remember the use case here is people hitting the reply button in their email client when reading a Discourse email notification; these emails are going to an actual email account on an email server somewhere via email protocols – not a website.

Makes more sense to focus on IMAP.

(Evaryont 🎆) #9

Indeed, the workflow would be identical. Instead of the resulting email resting in a POP3 inbox somewhere for up to 10 minutes, it is converted to a JSON document and “pushed” to Discourse immediately. No polling necessary. However, the webhook format is vendor specific.

(Jeff Atwood) #10

Yeah the vendor specific webhook is a dealbreaker for me. IMAP all the way.

(Jack Sadanowicz) #11

I’ve been having issues with the reply by email support being spotty, not working for some site members entirely. The emails are all getting through to the account, it seems like the POP3 polling just does not work some of the time. Not getting parsing errors logged on the site either. How do I diagnose what’s going on further?

(Helder Ribeiro) #12

Does the reply go to the root topic or as an answer to the specific post you’re replying to?

(Jeff Atwood) #13

It does both of those things – it is posted in the topic as if you had
clicked/tapped the reply button on the thing you are replying to, written a
post, then click/tapped submit.

(Helder Ribeiro) #14

Let me see if I understand. The way I was thinking, I thought each individual post in a thread (topic) had only one parent, and the parent depends on whether I click “Reply” on the post (arrow 1) or “Reply” on the topic (arrow 2):

I imagine clicking Reply #2 makes my post have the first post in the topic as the parent, and clicking Reply #1 sets it to the specific post.

So if the post I’m replying to by email is the last one in the thread, it’s handled as a Reply #2 and if it’s not anymore (there are more recent posts below it), Reply #1? Is that what you mean by “it does both things”?

Or can a post actually have two parents and when I reply by email my post gets both the original post and the replied-to post as parents?

Sorry for the confusion.

(Jeff Atwood) #15

It is more complex than that. If you quote 5 different replies in your reply, it has five “parents” it is attached to as a reply.

Granted, you cannot quote like that in an email reply… but email is, as I said, as if you had clicked/tapped the reply button on the post in the email you are replying to.

(Caue Rego) #16

I just created an account. Seems like it isn’t default anymore. :open_mouth:

Also, there are 2 “Email” tabs under admin: /admin/site_settings/category/email /admin/email

You want the first one, under “Settings”, as already implied in the first post (as of now).

Also, this is from another topic

How can we test if it’s working if we don’t receive any notification?

(Dave McClure) #17

To test it out, create another account, log in, and do something to trigger a notification on your first account (@mention, reply, etc).

You can also change your first account’s settings first by checking the boxes circled below:

You should then get an email you can reply to to test.

(Caue Rego) #18

Thanks David!

Oddly enough, I didn’t get any notification (email or insite) for your reply there. :open_mouth:

Maybe something to do with all updates going on.

(Clay Heaton) #19

I’ve tried to set this up but it isn’t working, at the moment. Discourse isn’t logging into the POP3S server. What do I need to do to look into the error logs (?) to determine what the problem was?


Works just fine using Zoho too.

Just the issue I’m having now is this: I’m getting an email about the new reply that i posted through the email.