Alternative subject for group pm email notifications

Continuing the discussion from Email Notification recipients unclear when PM is sent to multiple users:

We’ve just hit this problem, after migrating an email alias to Discourse, and having a few users confused by the subject line reading, for instance: [PM] Test for Discourse - it would be prefereable to have that as: [Reps Leadership] Test for Discourse. (Where Reps Leadership is the full name of the group).

I propose adding an option under the existing custom incoming email address option to Set %{optional_pm} to group full name (or clearer words to that effect, if anyone has them).

pr-welcome?

7 Likes

Sure using the actual group name seems smart.

1 Like

I think it’s possible to send a PM to multiple users, including multiple groups. What would happen in that case?

3 Likes

Sorry to be the spoil sport.

One idea would be to check: if the message is addressed to only group then go with [Reps Leadership] Test for Discourse. Otherwise use [Group PM] Test for Discourse. I don’t like the variance, but it’s the only way I could think of salvaging @LeoMcA’s idea.

Another idea is to ditch the usage of “P” entirely and not try and disambiguate by the number of recipients a message has. Just call everything messages:

[Message] Test for Discourse

In my summary of this issue this modifies (1). Which means that (2), clarifying recipients in the email, needs to be very clear.

Basecamp gets by with a byline in the footer. I’d start there. Let’s roll it out to our groups and see what catches fire :slight_smile:

3 Likes

np, the only reason I didn’t reply straight away was I’d just started to feel ill with a nasty bout of the flu I’ve just recovered from, and couldn’t wrap my head around any possible solution to the legitimate problem.

We definitely want to be able to distinguish between different types of messages in the subject for our use case.

I wonder if the solution might be to set the subject based on why a user is recieving a notification, so for a notification being sent to reps-leadership, admins and @user1, the subjects are like this:

reps-leadership: [Reps Leadership] Test for Discourse

admins: [Admin] Test for Discourse

@user1: [PM] Test for Discourse

That does still leave the possibility of the problem of a user being in multiple groups, and so sent the notification for multiple reasons (although it would require them to be watching all group inboxes), but I expect this is quite a small edge case, and we can just resort back to using [PM] Test for Discourse if it comes up.

With this solution, it would seem to make most sense to have this as a global setting, rather than one on specific groups.

What are the team’s thoughts on this solution?

2 Likes

I like the solution. The only possible issue I can think of is that someone might reply to their own message without realising that more people than those identified in the the subject will receive it. A solution would be to identify somehow that there are more recipients in the subject, as well as to mention them in the body of the email. (As I’ve asked for in the other thread.)

1 Like

Yes, that’s absolutely a problem. I’ve proposed a solution in the other thread:

Realized I never posted my PR here:

https://github.com/discourse/discourse/pull/5475

As the PR says:

I thought I’d KISS and just use the first group which receives the PM in the subject line. It’s not perfect, and could cause some confusion, but it’s behind a site setting and (I think) is still better than what currently exists.

7 Likes

Looks like it was never mentioned that this was merged a two weeks ago:
https://github.com/discourse/discourse/commit/5d9d0fcb4f3829297e8546b10381b58d3699ca55

6 Likes