Set up reply by email with POP3 polling

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 discourse.org 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.

:bell: Alternately, if you aren’t comfortable using GMail for this, you can set up your own incoming email service using Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver

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

  1. Create a new GMail account. If you do not set up a completely new email account old emails will be synced via POP3, causing unforeseen issues and sending bounce notification emails!

  2. Assign the new account a username like discourse-replies@example.com or in my case, replies@example.com (if you are using a normal GMail account replace @example.com with @gmail.com here). Give it a strong password.

  3. Log in to this account via http://mail.google.com. 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.

  4. 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.

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

  6. Change the following settings:

    • reply_by_email_address enter replies+%{reply_key}@example.com
    • pop3_polling_username enter replies@example.com
    • pop3_polling_password enter the password of that email account
    • pop3_polling_host set to pop.gmail.com
    • 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 interval via the pop3_polling_period_mins 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.

Forwarding mail sent to additional addresses

Let’s say that you are polling emails from the “replies@your.domain” account and you want to setup incoming emails for “help@your.domain” and “dev@your.domain”.

You will need to forward all the emails sent to “help@your.domain” and “dev@your.domain” to “replies@your.domain”. If you are using GMail, they have a great tutorial on how to automatically forward incoming emails to another account .

Then, Discourse will periodically poll emails from the “reply@discourse.org” account and deliver the emails to the corresponding category, group, topic or message.

Potential Issues

  1. 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.

  2. If you are using a GMail account (e.g. @gmail.com) or a Google Workspace mailbox (e.g. a Google mailbox @yourdomain.com), you will need to create an app password for your account, which is used in place of your account password in step 6.

See also: Troubleshoot reply by email

ℹ Since May 30th, 2022, the **Access from less secure apps** Google option isn't supported anymore, so you need to use app passwords, and enable the two-factor authentication to do so.

Last edited by @JammyDodger 2024-05-28T18:43:42Z

Check documentPerform check on document:
91개의 좋아요
Troubleshoot reply by email
Issues Configuring Respond by Email
How can I enable "reply to this email to respond"
Confused about setting up reply by email
Disable Reply Via Email
Reply by email Issues
Reply via Email — emails not getting to the staged user
What is "Mailing List mode"?
Reply-by email POP3 polling hosted with roundcube
Use Discourse as a Private Support/Ticket System
Email in to a private category
No received mails in new Discourse installation
Email polling error with Google Apps
Prevent creation of staged user for emails with auto-xyz header
I cant setup smtp. I tried everything
Mail-receiver relay access denied
Installation by the book
Email support with discourse
Notification email cannot be the same as reply by email
Notification Email From Set to noreply?
Multiple Mail Receivers for Multiple Discourse Instances
How to reply to email
How should Discourse System Market itself?
Instant notification for every new topic/reply
Discourse setting Reply-To value in `From` header field when using reply by eMail feature
Want to set internal forum on our reactjs member's platform
Reply by email with pop/imap feature use oauth instead of username:password
Webhook to forward posts to a mailinglist: best practice?
Configure authentication checks on incoming email
Replacing Mailing lists: Email-In
POP3 polling settings
POP3 polling settings
Personal Message Replies Not Displaying in Inbox When Initiated via Auto-Quoted Post
Forwarding email with reply-by-email enabled?
Configuring Incoming Email to Create Category Topics or Group Messages
Message 'receiver' not in view until they reply
Enabling reply_by_email
Customize the "reply to" address in new private message notification emails
How to configure c panel email server to work with incoming emails
Email Reply Issues After Provider Change
Some questions regarding to pop polling, wildcards and MX
Using subject line for reply-by-email identifier
Email notifications reply directly to me (the admin)
Free Discourse forum hosting for community-friendly GitHub projects
'hostname "mail.domain.tld" does not match the server certificate' :: SNI support? & how to query cert from Discourse container?
How might we better structure #howto?
How might we better structure #howto?
Disable reply via email?

이 가이드가 POP3 폴링에 특화된 것임을 알고 있지만, Gmail 계정을 사용하는 대신 #mail-receiver를 우선적으로 홍보하는 것이 더 적절하다고 생각합니다. 현재처럼 Gmail이 대안으로 제시되는 방식보다는, Gmail을 대안으로 다루어야 합니다.

저는 여러 Discourse 설치 환경을 설정해 보았지만, "Gmail"이라는 단어를 먼저 읽고 "Gmail은 잘 알지, 이것을 설정해 보자"고 생각하여 #mail-receiver를 시도해 본 적이 없습니다. 더 자세히 알아보거나, 다른 방식이 더 복잡할 것이라고 믿지 않았기 때문입니다.

결국 #mail-receiver를 시도해 보았는데, 모든 측면에서 더 나은 솔루션이라고 생각합니다.

Gmail 솔루션은 Gmail 계정에서 앱 비밀번호를 설정해야 하며, 이를 위해서는 2단계 인증도 필요합니다. 이 모든 과정을 수행하는 것이 다소 번거롭고, 결국에는 #mail-receiver가 거의 실시간으로 처리하는 것과 달리 낮은 폴링 빈도를 가진 이메일 답장 기능을 얻게 됩니다. 또한 제3자 소프트웨어에 의존합니다.

#mail-receiver를 홍보해야 하는 또 다른 이유는, Discourse 자체를 설치하는 것보다 더 많은 지식이나 기술적 숙련도가 필요하지 않기 때문입니다. 대부분 DNS와 yml 설정의 문제입니다.

Gmail 솔루션보다는 확실히 더 기술적입니다(특히 앱 비밀번호 설정 시 헤맬 때가 있었지만), 하지만 자체 호스팅 Discourse를 설치하고 설정할 수 있다면 #mail-receiver도 설치하고 설정할 수 있습니다.


그리고, 아마도 더 중요하게도 이것이 제가 이 부분에 집중하는 이유인데, 이메일로 답장 활성화(Reply by email enabled) 설정의 설명이 mail-receiver 가이드가 아니라 이 가이드로 링크되어 있습니다:

웹사이트에 로그인할 필요 없이 사용자가 이메일을 통해 주제에 직접 답장할 수 있는 기능을 활성화합니다. 자세한 내용은 Meta의 가이드를 참조하세요.

3개의 좋아요