New: Reply via Email Support!


(Robin Ward) #1

We’ve just enabled the ability to reply by email to Discourse for all users on meta! It works like on other sites such as Facebook or Github. If an email is related to a topic, it will say in the footer that you can reply to it. Simply reply to the message in your email client and your post will be made on Discourse.

Please help us test it out and give us feedback!

Configuring Reply by Email

To enable the feature on your own Discourse site, you need to set up a few site settings:

  • reply_by_email_enabled - set to true
  • reply_by_email_address - change to your email address that will handle replies. For example reply+%{reply_key}@reply.myforum.com. %{reply_key} is required and will be replaced with a unique identifier for the email.

Receiving Email

Right now we only support parsing replies from POP3S servers. In the future we’ll likely add other methods such as support for web APIs. Pull requests welcome! Here’s how to configure POP3s:

  • pop3_polling_enabled - set this to true
  • pop3_polling_port - Your POP3S server port (default is 995)
  • pop3_polling_host - The host to poll for mail
  • pop3_polling_username - The username for your POP3S account
  • pop3_polling_password - The password for your POP3S account

Using Gmail to Receive Email

We’ve tried it out with gmail and it seems to work great as they offer POP3s support. (Note: don’t confuse this with sending email. Gmail is not recommended as a SMTP server for a Discourse forum as you will encounter many limits and spam prevention measures.)

To use gmail, create an account and use the following pop3 settings:

server: pop.gmail.com  (try pop.googlemail.com if this does not work)
username: <your full gmail account address>
password: <you know this>

Have fun! :fish:

This is the original announcement which is only of historic interest. See the official howto for the latest.


"Email all Posts" option to allow email client interaction
What is the most awesome plugin for Discourse, that does not yet exist?
UTF-8 / RTL e-mail reply issues
(Kevin P. Fleming) #2

So… another big step towards a ‘mailing list’ interaction model for Discourse categories. Cool!


(aftakitani) #3

Wonderfull! Many users from my Discourse instance are asking for this.

Thank You!


(Jeff Atwood) #4

I moved 5 posts to a new topic: Discourse Emails end up in the “Promotions” tab in GMail


Discourse Emails end up in the "Promotions" tab in GMail
(knwang) #7

Congrats Discourse team for getting this up. We have a home grown discussion board system and had a huge boost in participation after we implemented reply via email. Now Discourse is looking more appealing than ever :slight_smile:


(knwang) #8

Are there ways to integrate with 3rd party email providers who support “inbounding emails” - mostly they’ll parse the emails for you and send you a web hook (that Discourse can receive). I prefer that more than pop3 polling.


(Robin Ward) #9

Not yet! We started with polling because it was easiest for our setup, but
we’d love to support web hooks too. It probably won’t be too hard due to
the way the internal API works.


(Brian Barlow) #10

Sorry, I don’t fully understand what we are supposed to put in the field.

We setup a pop account on our internal exchange server to handle this talk@companyname.com
How should I setup this reply?
thanks!
Brian


(Robin Ward) #11

You need an address that can accept wildcards. That’s how our system knows the context of the email being replied to. So for example gmail will accept accountname+anything@gmail.com and send it to accountname@gmail.com.

So in that case you’d use accountname+%{reply_key}@gmail.com as your email address. When sent, the email would look like accountname+a2cabef94asdf9asdf@gmail.com or something.

Does your internal exchange support wildcard email addresses? The goal is to get anything that matches a string our app builds to go into the same mailbox.


Reply to email - key in subject instead of email address?
(Brian Barlow) #12

FYI for others with the same question.

Wildcard email addresses on Exchange Server 2007 or 2010.

It can do it, but not directly and with some very real tradeoffs

http://technet.microsoft.com/en-us/library/bb691132(EXCHG.140).aspx
http://technet.microsoft.com/en-us/library/bb691132(EXCHG.80).aspx

In my case, easier to just use a gmail account.


(Sam Bauch) #13

Is there a way to test that the polling is set up correctly other than testing with live emails?

I’m trying to set this up against a google for business account or whatever its called with our own domain, and not quite sure what to put for the pop3s_polling_host field


(Robin Ward) #14

Right now the only way to test is to send yourself a message with another
account and not log in for 10 minutes.

For google accounts, the host is always the same as in the example I
provided. The username is the full email and includes the domain and that
is enough for google to work properly. (we use a business account for
Discourse).


(Sam Bauch) #15

wow, that was incredibly easy. was expecting it to get a little hairy somewhere!

really, really spectacular feature team, great work.

saves me a number of “hey, this email that you sent didn’t go where you think it did, you gotta log back in” emails!


(Dave McClure) #17

What happens if you reply to an email notification on a topic that is closed? I’ve been meaning to test it, but never got email notifications working from a development environment…


(Jeff Atwood) #18

Good question! @eviltrout?


(Sam Saffron) #19

Its going through the standard post creation pipeline, I would assume it just fails to post it.

I guess, the correct thing to do would be to send you an email back telling you that it was closed/deleted and your response was rejected.


(Robin Ward) #20

As Sam mentioned it uses the same system. We really should consider
sending them a message saying it didn’t go through with the reasons
why in the body.


(Kevin P. Fleming) #21

When I operated mailing lists, I ended up disabling all such notifications about post failures, because they can be fairly easily exploited as ‘amplification’ attacks. If you do decide to implement these sorts of notifications, please make them controllable via the admin settings.


(Jeff Atwood) #22

We can probably just ignore it for now, the user has a copy of the post in their email regardless so nothing is lost.


(mojzis) #23

how can one trace troubles with this feature ? it worked fine on our forum and after a restart it doesn’t anymore … but I cant see anything in logs or anywhere …
one sign though :slight_smile: the number of unsent emails on the admin page is going down now … i guess there is some subtracting going on ?
thanks