Set up Reply via Email Support ✉


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


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


(Dan Wilke-Grimm) #29

I may have needed to do some or all of the following to allow Discourse access to POP to my gmail account:

Uncertain about the security implications but want to share.


(Jp Maxwell) #38

Any thoughts about using mail gun? Mailgun will receive incoming e-mail, strip the response thread out and inject the body via an API on the receiving server.

This seems perfect for Discourse allowing users to easily reply and not having a POP box that has to be polled.

Also is there support for starting new threads using e-mail?


(Andrea Bedini) #39

Mailgun also supports POSTing the raw email message to some HTTP endpoint. Supporting this would go around the “vendor specific webhook” @codinghorror frowns upon. I’m looking to see if it’s possible to implement it as a simple plugin. I don’t have much experience with Discourse.


(Andrea Bedini) #40

Yes, see:

https://meta.discourse.org/t/set-up-email-in-start-topic-via-email/27686?source_topic_id=14003

(Tobias Eigen) #47

I think you can future proof this #howto topic by adding “check the mailbox for errors”. The email from Google explains exactly what is needed in this case.


(Dean Taylor) #48

I posted this elsewhere, but thought this might be useful to others here / perhaps edited into the original post.

If you end up with a setup like this after using Gmail for you incoming mailbox …

You can clean up your branding here and stop the user from seeing emails from @gmail.com even when you don’t have mail alias support (username+alias@example.com) with your mail server:

  1. Setup a subdomain reply.my-discourse-site.com
  2. Add additional domain reply.my-discourse-site.com to outgoing mail provider.
  3. Add “TXT” DNS records for SPF / DKIM to reply.my-discourse-site.com provided by your outgoing mail provider.
  4. Setup a mail forwarder to forward *@reply.my-discourse-site.com to my.discourse.site@gmail.com
  5. Change reply to replies+%{reply_key}@reply.my-discourse-site.com

Reply to email - key in subject instead of email address?
Using subject line for reply-by-email identifier
(Tom Newsom) #49

I forwarded your advice to our email guy and he said it wouldn’t work because we already use Google Apps to provide our @domain.com email addresses (and at $6/month we’re not particularly keen on taking on more of them). Is he right?


(Dean Taylor) #50

In this case the sub-domain reply.my-discourse-site.com can use a completely different provider and setup when compared to the domain my-discourse-site.com.
So you “could” use any standard hosting just for MX mail exchange (receipt) on just that sub-domain.

If you are actually paying for “Google Apps for Work” (not the legacy free edition of Google Apps) you can configure mail to forward (to the free Gmail account) for free.

You don’t even need a sub-domain so instead of:
replies+%{reply_key}@reply.my-discourse-site.com
you could go with:
replies+%{reply_key}@my-discourse-site.com

  1. Login as a domain admin https://admin.google.com/
  2. Select “Apps” >“Google Apps” > “Gmail”
  3. Select “Advanced settings >” (near the bottom)
  4. Select “Default routing” at the top
  5. Select “Add Setting”
  6. Setup the setting as follows:

    That regular expression is ^replies\+[^@]+@
    If you have multiple domains in your Google Apps for Work account you might want to include the domain qualifier on the end of that expression (remember to escape you periods \.)
  7. Save

That will then forward that mail elsewhere for free without requiring payment for an additional Google Apps for Work user.


Using subject line for reply-by-email identifier
(Mitchell Krog) #71

Works 100% running it through my postfix server. Thanks for a simple guide to this.


(Geoff Bowers) #74

What is the purpose of the alternative reply by email addresses option?


(Jeff Atwood) #75

No idea! Anyone else know?


(Sam Saffron) #76

I assume this is for added flexibility, but can not thing of the particular use case off the top of my head. For incoming “group” and incoming “category” emails the use case is much easier to explain.


(Jay Pfaffman) #77

You might change the address for some reason and not want the old one(s) to break. The real question is why reply by email address allows just one address and alternative.. allows a list. If reply by email address were a list, there’d be no reason for the other.


(Régis Hanol) #79

This was indeed done to support changing email addresses. At the time it was easier to add another list but I agree, merging the two settings makes much more sense. Added to my :pencil:.


(Matt Palmer) #80

No, I think you still want two separate settings. The reply by email address is the template that will be used to generate the return address on outgoing mail, and alternative reply by email addresses is for any other addresses you want recognised as reply addresses for incoming e-mail. As @pfaffman said, you use the alternatives list when you change addresses for some reason, and don’t want new replies people make just after the switch (which will go to the old address, the one that was in the mail they received) to be thrown out.