# Sending automatic replies to private messages for a specific user

**URL:** https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414
**Category:** Support
**Created:** [24.Май.2018 22:24:21 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414 "2018-05-24T22:24:21Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![thover](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@thover](https://meta.discourse.org/u/thover)
#### Post date: [24.Май.2018 22:24:21 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/1 "2018-05-24T22:24:21Z")

</div>

Hello,

For a specific user on my Discourse installation, I would like to be able to send automatic replies to any private messages that user receives.

Is there any way to do so?

Thanks in advance,  
Thomas

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [24.Май.2018 22:29:11 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/2 "2018-05-24T22:29:11Z")

</div>

Is it a user who’s account you control? If yes then you could try setting it to mailing list mode and set up a mail autoresponder that would respond to PMs by email.

---

<div class="post-metadata">

### Author: ![thover](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@thover](https://meta.discourse.org/u/thover)
#### Post date: [24.Май.2018 22:36:24 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/3 "2018-05-24T22:36:24Z")

</div>

Thanks for your reply @HAWK.

Yes it is. I tried this though, defining a filter with the destination e-mail address and the words “[PM]” in the e-mail in GMail but GMail never fired the autoresponder.

Is there no way to do this directly in Discourse?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [24.Май.2018 22:37:28 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/4 "2018-05-24T22:37:28Z")

</div>

Damn, that’s annoying! @jomaxro might be able to help. He does lots of Gmail–Discourse wrangling.

> [@thover](#):
>
> Is there no way to do this directly in Discourse?

There is not.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [25.Май.2018 16:29:40 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/6 "2018-05-25T16:29:40Z")

</div>

Sadly I cannot help. This is a very similar situation to one I previously attempted to fix via Gmail, but there’s no easy fix. Mail from Discourse has a “mailing list” header, as the email is auto-generated. As one of our engineers explained to me when I asked why:

> Because they’re not human-generated. Good mail handling hygiene dictates that you not send autoreplies to machine-generated e-mails, because that is how mail loops form (machine A sends a notification to machine B, machine B sends autoreply to machine A, machine A sends autoreply to machine B, and so on).

To resolve this you’d need to either A) create a Discourse Plugin that can handle this or B) create your own autoresponder service and hook it up to this user. If you choose to do either, be careful to avoid creating a mail loop.

---

<div class="post-metadata">

### Author: ![thover](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@thover](https://meta.discourse.org/u/thover)
#### Post date: [08.Июнь.2018 13:57:17 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/7 "2018-06-08T13:57:17Z")

</div>

Thanks @jomaxro for taking the time to reply to this.

I understand there’s no real solution for it and if I get some time I might have a try in developing a plugin for it. Maybe it could be a feature request for a future version of Discourse ?

Thomas

---

<div class="post-metadata">

### Author: ![Jiri\_Richter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jiri_richter/32/117767_2.png) [@Jiri\_Richter](https://meta.discourse.org/u/Jiri_Richter)
#### Post date: [06.Февраль.2019 22:57:31 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/8 "2019-02-06T22:57:31Z")

</div>

Sorry to dig the graves here, but I couldn’t find anything more related to my query.

I’m really interested in this. We run a support forum for a mobile app, and concurrently use an email support service (HelpScout), which is fine but there’s so much repetition in support email that it just has to have a better solution. We went with Discourse as a community counterpart where the support information is shared in one-to-many relationship.

Currently I’m trying to figure out if Discourse could work as a complete support solution for both public and private support queries.  
As I’ve read [here](https://meta.discourse.org/t/discourse-as-a-private-email-support-portal/34444/43) there have been some experiments with incoming email to Discourse that get treated as group PMs, which is exactly what I’d imagine (coupled with the Assign plugin).

What I’m missing is a way to intercept incoming PMs, run some script on them and possibly respond back with an autogenerated reply, based on analysis of the content, as a “zero level” support. In a similar vein that Zendesk’s Answer Bot works.

I understand that a plugin would need to be built for that, which I’m comfortable with. My question is - where is the pipeline through which the private messages go? Where should I start looking if I want to intercept every PM to a specific group of users?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [06.Февраль.2019 23:02:14 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/9 "2019-02-06T23:02:14Z")

</div>

I would hold tight for a month or 2, @dan is just about to test out very deep IMAP integration support for Discourse where mailboxes are synced and seamless, and it sounds to me like it would be a perfect fit for your use 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: [07.Февраль.2019 01:00:36 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/10 "2019-02-07T01:00:36Z")

</div>

> [@Jiri\_Richter](#):
>
> What I’m missing is a way to intercept incoming PMs, run some script on them and possibly respond back with an autogenerated reply, based on analysis of the content, as a “zero level” support. In a similar vein that Zendesk’s Answer Bot works.

I’m unclear how what you wrote above @sam is an answer to the question stated above?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [07.Февраль.2019 01:03:56 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/11 "2019-02-07T01:03:56Z")

</div>

I guess I was focusing on:

> if Discourse could work as a complete support solution for both public and private support queries.

Which IMAP helps with a lot.

Regarding running custom scripts, this is already completely possible without even changing anything in Discourse.

We have Discourse mail receiver per: [GitHub - discourse/mail-receiver · GitHub](https://github.com/discourse/mail-receiver) it simply talks to a JSON API to deliver mail. One could adapt it to do more pre-processing prior to talking to our API. Or you could create a custom tool here. Plenty of options.

---

<div class="post-metadata">

### Author: ![Jiri\_Richter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jiri_richter/32/117767_2.png) [@Jiri\_Richter](https://meta.discourse.org/u/Jiri_Richter)
#### Post date: [07.Февраль.2019 13:09:01 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/12 "2019-02-07T13:09:01Z")

</div>

@codinghorror, @sam, big thanks for your replies.  
mail-receiver is most probably what I was dreaming about. I’ll take a look at it and try to set it up along my Discourse instance.

Regarding the IMAP integration, is there any public discussion about that? I took a look at udan11’s posting history on meta but did not see any mention of IMAP.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [07.Февраль.2019 16:48:24 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/13 "2019-02-07T16:48:24Z")

</div>

> [@Jiri\_Richter](#):
>
> Regarding the IMAP integration, is there any public discussion about that? I took a look at udan11’s posting history on meta but did not see any mention of IMAP.

Nothing yet. It is not yet ready for formal testing, let alone production. Dan will post on Meta once we have something ready.

---

<div class="post-metadata">

### Author: ![Jiri\_Richter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jiri_richter/32/117767_2.png) [@Jiri\_Richter](https://meta.discourse.org/u/Jiri_Richter)
#### Post date: [05.Сентябрь.2019 14:50:55 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/14 "2019-09-05T14:50:55Z")

</div>

Привет снова,

это [этот PR](https://github.com/discourse/discourse/pull/7973), о котором вы говорили?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [28.Сентябрь.2019 16:06:29 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/15 "2019-09-28T16:06:29Z")

</div>

Да, это PR, и он скоро будет слит.

---

<div class="post-metadata">

### Author: ![Jiri\_Richter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jiri_richter/32/117767_2.png) [@Jiri\_Richter](https://meta.discourse.org/u/Jiri_Richter)
#### Post date: [19.Декабрь.2019 14:59:46 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/16 "2019-12-19T14:59:46Z")

</div>

Я оставляю здесь ссылку на новый PR для IMAP, чтобы лучше отслеживать статус.

> <https://github.com/discourse/discourse/pull/8301>
>
> Co-authored-by: Joffrey JAFFEUX \<j.jaffeux@gmail.com\>

Я с большим нетерпением жду этого, огромная благодарность всем участникам!

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [28.Июнь.2023 11:28:25 UTC](https://meta.discourse.org/t/sending-automatic-replies-to-private-messages-for-a-specific-user/88414/17 "2023-06-28T11:28:25Z")

</div>

> [@Jiří Richter](#):
>
> Я действительно с нетерпением жду этого, огромная благодарность всем участникам!

Так как это объединено, вы уже внедрили автоматический ответ?  
Это может быть очень полезно, поскольку большинство писем в личные сообщения касаются известных проблем, на которые часто даются стандартные ответы.
