Page MenuHomePhabricator

Allow organizers to receive a copy of an email
Closed, ResolvedPublic3 Estimated Story Points

Description

Acceptance Criteria:

  • Given than an organizer is sending an email to participants,
    • They should have the option to send a copy of the email to themselves
      • Text to use when opting into sending email: "Email me a copy of my message"
      • Text to use in email subject: "Copy of your message to participants of [Name of event]"
  • If an organizer is also a participant, and if they choose to email themselves as a participant (either through select all or individual selection), and if they have not chosen to receive a copy of the email, then they should receive the same message that participants see.
  • If all selected participants are invalid (e.g., because they do not have an email address), and the organizer chooses to receive a copy of the email, then 1) they will not receive a copy of their message, and 2) we should still display the error shown in T385607#10568821.

Example of how this looks in email this user:

Screenshot 2025-02-05 at 9.28.44 AM.png (1×2 px, 221 KB)

Event Timeline

ifried set the point value for this task to 3.
Daimona subscribed.

@ifried Non-blocking question: what should happen when the organizer sending the email is also a participant, and they select themselves amongst the recipients? If they choose to receive a copy of the email, it seems obvious that they should only receive a copy, and not the "normal" message that participants will receive. But what if they don't choose to receive a copy of the email? Should they: 1) still get a copy, 2) receive the same message that participants see, or 3) receive nothing? I don't have a preference, and these options are the same in terms of implementation, so I can implement whatever you think would make more sense and be less confusing.

Also: should we still send a copy if no other emails are being sent, for example because all the selected participants are invalid? I'm assuming no, unless there's a use case I don't know about. If, instead, the answer were yes, there would be the question of what the bubble notification should be: success state or failure state?

Change #1119747 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] [WIP] Implement backend for CCMe feature

https://gerrit.wikimedia.org/r/1119747

Change #1120218 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] [WIP] Implement checkbox for organizer to receive copy of emails

https://gerrit.wikimedia.org/r/1120218

This is almost ready, pending confirmation of the scenarios in T385607#10553377 and T385607#10553457. The questions are now blocking because we will not be using a feature flag for this.

@Daimona, getting back to you:

@ifried Non-blocking question: what should happen when the organizer sending the email is also a participant, and they select themselves amongst the recipients? If they choose to receive a copy of the email, it seems obvious that they should only receive a copy, and not the "normal" message that participants will receive. But what if they don't choose to receive a copy of the email? Should they: 1) still get a copy, 2) receive the same message that participants see, or 3) receive nothing? I don't have a preference, and these options are the same in terms of implementation, so I can implement whatever you think would make more sense and be less confusing.

If an organizer is also a participant, and if they choose to email themselves as a participant (either through select all or individual selection), and if they have not chosen to receive a copy of the email, then we should go with option 2 - receive the same message that participants see. This is because they may be selecting themselves for a reason -- i.e., they want to see exactly what participants see. Meanwhile, option 2 provides the least harm/confusion, since it is just doing what they have chosen to do.

I also think there is an argument to actually always send an email to an organizer if they selected themselves from the participant list, even if they also selected to get a copy. This is because it is just the most faithful following of what they explicitly chose to do. But I don't think it is strictly necessary, and it may be more confusing than helpful (since the organizer would receive 2 slightly different emails and wonder why, if they weren't paying attention).

So, let's go with option 2.

Also: should we still send a copy if no other emails are being sent

To clarify: the simplest way to reproduce it is for the organizer to select only people who cannot receive emails.

Also: should we still send a copy if no other emails are being sent, for example because all the selected participants are invalid? I'm assuming no, unless there's a use case I don't know about. If, instead, the answer were yes, there would be the question of what the bubble notification should be: success state or failure state?

I suppose it would be confusing if NO participants could receive an email, but the organizer receives an email copy (thereby seeming to imply that emails were successfully sent). I cannot think of a valid use case when an email copy should be sent in this scenario. Meanwhile, when I test trying to email people without email addresses associated with their accounts, I get the following message: "Please select valid email recipients" (see screenshot examples below)

Screenshot 2025-02-20 at 10.15.05 AM.png (1×1 px, 85 KB)

Screenshot 2025-02-20 at 10.13.40 AM.png (1×1 px, 86 KB)

I think we can keep this view, since it shows that no email (and, therefore, no email copy) was sent. The user would need to try again to send an email with a copy.

So, decision is: No email copy sent in this scenario.

Change #1119747 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Implement backend for CCMe feature

https://gerrit.wikimedia.org/r/1119747

Change #1120218 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Implement checkbox for organizer to receive copy of emails

https://gerrit.wikimedia.org/r/1120218

vaughnwalters subscribed.

@Daimona for this AC:

If an organizer is also a participant, and if they choose to email themselves as a participant (either through select all or individual selection), and if they have not chosen to receive a copy of the email, then they should receive the same message that participants see.

If an organizer is also a participant and they choose to email themselves as a participant AND select to receive a copy should two emails go through to them? I don't know why they would want to do this, but asking because right now only one email is going through in this scenario. This is on betacluster though, so it could be just because sometimes emails coming from betacluster have a higher rate of failure to send.

If an organizer is also a participant and they choose to email themselves as a participant AND select to receive a copy should two emails go through to them? I don't know why they would want to do this, but asking because right now only one email is going through in this scenario. This is on betacluster though, so it could be just because sometimes emails coming from betacluster have a higher rate of failure to send.

In that scenario, we are intentionally sending out a single email (the copy). There were/are a few holes in the AC so I just implemented what I thought would make more sense. It's easy to change if we want to.

If an organizer is also a participant and they choose to email themselves as a participant AND select to receive a copy should two emails go through to them? I don't know why they would want to do this, but asking because right now only one email is going through in this scenario. This is on betacluster though, so it could be just because sometimes emails coming from betacluster have a higher rate of failure to send.

In that scenario, we are intentionally sending out a single email (the copy). There were/are a few holes in the AC so I just implemented what I thought would make more sense. It's easy to change if we want to.

Ah, sounds good. 👍🏻


  • Given than an organizer is sending an email to participants,
    • ✅ They should have the option to send a copy of the email to themselves
      • ✅ Text to use when opting into sending email: "Email me a copy of my message"
      • Screenshot 2025-02-26 at 11.35.46 AM.png (86×542 px, 11 KB)
      • ✅ Text to use in email subject: "Copy of your message to participants of [Name of event]"
      • Screenshot 2025-02-26 at 11.36.42 AM.png (108×1 px, 26 KB)
  • ✅ If an organizer is also a participant, and if they choose to email themselves as a participant (either through select all or individual selection), and if they have not chosen to receive a copy of the email, then they should receive the same message that participants see.
  • ✅ If all selected participants are invalid (e.g., because they do not have an email address), and the organizer chooses to receive a copy of the email, then 1) they will not receive a copy of their message, and 2) we should still display the error shown in T385607#10568821.

All AC is met, but I'm keeping this ticket in QA until it goes to prod to test it there as well before moving it along.

This is working correctly in prod now too. Sending to design sign off

Screenshot 2025-03-07 at 1.06.41 PM.png (1×1 px, 127 KB)
Screenshot 2025-03-07 at 12.59.24 PM.png (890×1 px, 169 KB)