Allow reply-to individual instead of topic/forum (mailing list feature)


(Tarek Loubani) #1

Hello all,

I have looked at several topics (e.g., 1) and I don’t see that this need has been addressed previously.

I am using some forums as direct mailing list replacements. For example, we have a mailing list that we used for some users asking all others if they would like their shifts (e.g., “Shift tomorrow for trade”). In GNU/Mailman, the correct setting would be to set “reply to sender”.

I have clearly articulated in a tutorial how I think people should use the mailing list, but it’s clear that’s not happening. People are still sending to the forum, and because all users are by default “watching”, everybody receives messages that used to be sent privately. Instead of making life better, at this point the lists have made things at best net neutral, though worse for most.

So, what I would like is for either:

  1. The messages in this category to automatically get sent as PMs; or
  2. Messages to come back via email to that individual user.

Is this already possible? If not, any thoughts on how I could make it happen? I think for my purposes, this might be a killer for our users if we can’t resolve it…


MOSS Roadmap - Mailing lists
Mailing list mode and email addresses
MOSS Roadmap - Mailing lists
Sites who want real email addresses and no private messaging
(Erlend Sogge Heggen) #2

I’m not quite following. Could you describe an example scenario of things going wrong in this setup?


(Tarek Loubani) #3

Alice wishes to offload her Wednesday shift from a group of colleagues in a group named @Consultants, who are all watching #Shift-Trades.

She sends a message saying:

Hi, I want to get rid of my Wednesday shift at the urgent care from 12pm to 8pm. Any takers?

Most users will receive Alice's request via email, as they are set to watch the category by default.

According to the instructions @Tarek sent, they should respond by one of:

  • hitting “reply” and deleting the replies+random@example.com and replacing it with alice@example.com.
  • Going to the ‘visit this thread’ option at the bottom of the email and respond by ‘flag’

However, most users will simply hit “reply” (not reply-all as they have been trained over time) and respond with “Sorry Alice, I can’t. Busy”. These messages should only arrive to Alice, and not the entire group.

Expected behaviour:

Bob should be able to reply by default only to Alice, and should have to make an effort to reply to the whole group.

Does that make my intentions clear?


(Jeff Atwood) #4

So you want to expose emails for everyone? E.g. each individual email reply literally comes from that person, and replying via email would only reply to that person?


(Mittineague) #5

That sounds not so good to me.

Maybe a way to create a new message with only the two instead of the entire group?


(Tarek Loubani) #6

Hi Jeff,

I’ve included the GNU/Mailman option below. Either is fine by me in this case where we all trust each other: Either the individual’s email address is directly exposed; OR it would force the reply to go to a PM to that person. Either way, it is a nuisance to most members of the list to receive the reply messages.

A super bonus: If the “Reply-To/From” were the sender, but a CC shows the replies+random@example.org such that if the user says “reply all”, they would hit the public topic/list (as expected in most mailing lists).


(Tarek Loubani) #7

I’ve been looking at the source code and concluded that this feature does not as of yet exist. Are there any hints as to whether this might be considered for core development or if I’d have to try to develop it alone?

I do think it represents a critical piece of a mailing list, especially in terms of keeping traffic acceptable for some of these mailing lists with needs as described above.


(Jeff Atwood) #8

Sure, sign up for an enterprise hosting plan if you wish to fund the development and feel strongly about the feature existing. That is the fastest way.


#9

I’d also like to see this and suggest that Reply Privately or Reply to Sender (or some such) be added to the expanded ("…") post options menu.


(Jeff Atwood) #10

It already exists – the flag dialog lets you do this.

This discussion seems to be about pure email that never touches the website, though, so I’m confused what your statements have to do with the topic.


(Steve Combs) #11

As mentioned, below is a summary of the earlier points in this topic, and new thoughts, on letting a user reply privately to a post.

“Reply To Sender” Feature

  • feature is about pure email users; online users can use flag to private message
  • feature shouldn’t disclose email addresses
  • feature should force a PM to the user via email; see details below
  • feature will notify the recipient according to their PM preferences; default is email) (currently supported; no change needed)
  • recipient can respond via site or by email response (currently supported; no change needed)
  • sender field would include Username noreply@example.com (currently supported; no change needed)
  • subject line would start with [Message] (currently supported; no change needed) or possibly [Private Reply] followed by [Topic Name]

Email Client

  • User selecting “Reply” or “Reply to All”) in their email client should respond to the post on the site, not via PM (currently supported; no change needed)

Email Message

  • Current footer of email is “[Visit Topic] or reply to this email to respond.” (currently supported; no change needed)
  • Add: “You can also reply privately to the user.” with a mailto: link to trigger the feature
  • Feature would populate email client send field with [User Name or Full Name] (according to site settings) and send email to replies+;asjdf;alskjdfa@example.com] (just like PMs work currently)

Note: This would also clarify that the current “reply to this email to respond” language is not the same as replying privately (which can be confusing to users as currently implemented).


(Dean Taylor) #12

@sam previously mentioned an idea he had for handling display of users as actual email addresses in the email client for PM’s…
… it seems relevant here:


(Tarek Loubani) #13

Thank you so much for doing this! I have a few comments that I think would improve this spec and make it resemble the mailing list features that I envision:

I think this would be fine. However, it would be fine in some intimate contexts to disclose email addresses, I think. In my group, definitely not an issue. If possible, ideally this would be an option.

I propose this as making more sense: If the user hits “Reply”, then it goes ONLY to the user who sent the message. If they “Reply to All” from the mail client, then it will go to the Topic. This would behave more like normal mailing lists.

This could be via two reply+ addresses, one in Reply-To, and one in CC.

Thank you again for doing this!!


(Steve Combs) #14

@DeanMarkTaylor since the reply would only go to one user, not sure we need to sort out the multiple users in email response issue. It would be the same approach though–recipient would be identified with a reply key for the PM.

I do think showing the parties to the message in the email is important (critical for multiple party PMs) and trying to match the online experience for PMs would be good at least for consistency purposes:

Not required for this feature since there would only be two users, but would love to fix the “show multiple parties to PM” issues.


(Steve Combs) #15

I assumed exposing emails and the “reply” function of email clients would be the two biggest issues.

Letting any user discover the email of any other user on the system would be a big deal for a lot of communities. I understand listservs operate that way. Could be abused in lots of different ways and require additional security/privacy features. Would have to be opt-in (user account setting; defaulted to off) for existing communities and disclosed fully for new communities. If the private messaging features work via email, not sure why a user MUST HAVE the email address. It would eliminate protections like blocking users and add potential liability to community operators (email address can expose a lot of info about people). Users can choose to put that info in their profile or post.

I agree the reply-to issue is important for users. The reply-all feature of most email clients is not the default and sort of hidden many times. So we are making community users do more work to participate in the community or, even worse, users may think they are replying to the community (current Discourse default) and it just goes to the one user.

Instead of

Consider the following:

If the user hits “Reply”, then it goes to the user who sent the message [username] [replies+fasdfsdfa@example.com] AND the community [sitename] [replies+asdfasasdfa@example.com] (with the replies keys for each listed separately in the To: field. The user could delete the sitename address out of the To: field if they choose. (Would need to not send duplicate emails to the recipient if both emails remain). Alternatively, just add a setting so users can choose the reply functionality (like in your screenshot above). This would also fix the confusion about “reply to this email to respond.” I’d support that approach.


(Tarek Loubani) #16

Agreed that exposing people’s email addresses is in no way a must have. I suggest it only if it makes things simpler.

For example, considering that I personally lack the programming experience, I imagine that my hack to do this will consist of introducing the “reply to” as the sending user’s email address and the “CC” as the replies+ address, such that the expected behaviour people know (reply = just the user; reply all = the whole community) would work. Yes, some issues are introduced (namely, duplicate reception of emails), but it would generally solve the need.

In that sense, I would suggest that “reply” from an email client (e.g., reply-to header) should be the SENDER and “reply all” should be the topic.

tarek : )


(Erlend Sogge Heggen) #17

Is that really how “normal mailing lists” work? Google Groups, easily the most popular mailing list platform in existence, does not appear to work this way. By default, my reply will be to the mailing list address and noone else.

I like @scombs’ proposal to add a special PM button and have that open a new email dialogue. It’s not prone to user error; there are no surprises here as there could be if we’re getting involved with Reply/Reply-to-all conventions.


(Tarek Loubani) #18

I just took a look at a few lists I’m on. Of about ~ 15 google groups, all of them have reply-to-list as their default (not sure that reply-to-sender is an option). Of about ~ 15 GNU/Mailman lists, all of them had reply-to-individual as default. I don’t have enough yahoo group subscriptions to make any statements about them.

So perhaps it’s a philosophical choice that the different list providers make on behalf of list admins?


(Tarek Loubani) #19

I’ve been playing around with the code, and arrived at this:

In line 148 of lib/email/message_builder.rb, this would result in what I would like to do:


      if allow_reply_by_email?
        result['X-Discourse-Reply-Key'] = reply_key
        result['Reply-To'] = "test1@test.com"
        result['CC'] = reply_by_email_address
      else
        result['Reply-To'] = from_value
      end

However, now I’m trying to figure out what the ‘sender email address’ variable would be in ruby world…


A list of server-side functions for weekend/novice Discourse developers?
(Tarek Loubani) #20

After lots of support and help from others, I have finally sorted out the rawest form of how to accomplish this. It is presented below as a patch:

diff --git a/lib/email/message_builder.rb b/lib/email/message_builder.rb
index f099b11..2a69249 100644
--- a/lib/email/message_builder.rb
+++ b/lib/email/message_builder.rb
@@ -147,7 +147,15 @@ module Email
 
       if allow_reply_by_email?
         result['X-Discourse-Reply-Key'] = reply_key
-        result['Reply-To'] = reply_by_email_address
+        if @opts[:private_reply] == true
+          result['Reply-To'] = reply_by_email_address
+        else
+          p = Post.find_by_id @opts[:post_id]
+          result['Reply-To'] = "#{p.user.name} <#{p.user.email}>"
+          result['CC'] = reply_by_email_address
+        end
       else
         result['Reply-To'] = from_value
       end

This patch does the following:

  1. By default, users who hit ‘reply to’ will only reply to the sending user.
  2. For a user to post a public message to the mailing list / topic, they would have to hit ‘reply all’.
  3. It does not act on private messages.

Note: This exposes the sender’s email address to all recipients.

Unfortunately, I will implement this patch for our use-case effective immediately.

However, I recognize that it would be amazing if the following were true:

  1. A per-category or site-wide option to select this
  2. A per-category or site-wide option to expose email addresses.
  3. Integration into personal messages rather than via email directly.
  4. When the responding user hits ‘reply all’ and selects both the list and the sending user, the sending user should not receive an email notification from Discourse. Currently, two messages - one via email and one via Discourse - will arrive.

I hope the patch as it is helps somebody. If I could make it a per-category option, would you guys consider folding it into the master branch, @erlend_sh?


A list of server-side functions for weekend/novice Discourse developers?
A list of server-side functions for weekend/novice Discourse developers?