Page MenuHomePhabricator

Send double opt-in email template after donation for donors in Italy and Austria
Closed, ResolvedPublic

Event Timeline

Lars removed Lars as the assignee of this task.
Lars moved this task from Triage to Current Sprint on the Fundraising-Backlog board.

Just summarizing what we discussed today:
We will send this in thank you queue, with logging to see if we have any significant number of emails that are failing to send (when the thank you email was successfully sent).
We will only send the email if: the contact has a primary address in Italy or Austria and they opted in on the donation form (and are able to receive emails otherwise) and they are not already double opted in.

Also, when checking for double in activities, let's check for activity target (even though we currently record these as activity source). T416018: DR should be able to add double opt in activities will require this change.

Change #1236398 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] WIP send double opt-in email during TY BatchSend

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

Change #1236398 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Send double opt-in email during TY BatchSend

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

Change #1237313 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Only look for completed double opt in activities before sending email

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

Change #1237313 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Only look for completed double opt in activities before sending email

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

Change #1237350 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Only look for double opt in activities with the donor's email address

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

Change #1237350 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Only look for double opt in activities with the donor's email address

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

XenoRyet set Final Story Points to 4.

Hi @Lars , @ppenloglou and everyone who has been working on this!

I'm trying to test this over here in North Carolina. We have an Italy banner pre-test next Tuesday, where presumably this would be in place for new donors who meet the criteria.

I'm seeing an error message when attempting to trigger it. Here are the steps to reproduce. Is this expected, and if so, could you LMK how I can actually test and verify it's working?

  1. Open this banner preview link, with country=IT specified in the URL: https://en.wikipedia.org/wiki/NASA?banner=B2526_021716_enIT_dsk_p1_lg_twn_twin1&country=IT
  2. Submit a donation and checkout via credit card. I'm using variants of my Wikimedia email address, most recently spatton+dblopt01@wikimedia.org as in screenshot 01.
  3. I am able to submit the gift, get the TY page and also the regular TY receipt plus new double opt-in confirmation.
  4. When I click Yes, confirm my email in the double opt-in email, I land on the error page in screenshot 02. URL = https://donorpreferences.wikimedia.org/index.php?title=Special:EmailPreferences/optIn&uselang=en&contact_id=70063053&checksum=9a44c110666aa3f95edbb93ced9c3c80_1770995826_168&email=spatton+dblopt01@wikimedia.org

Screenshot 2026-02-13 at 10.24.27 AM.png (2×1 px, 324 KB)
Screenshot 2026-02-13 at 10.24.45 AM.png (1×1 px, 136 KB)

@spatton Thanks for testing. You've hit a known bug that we haven't figured out a solution to yet, but is definitely on the list, which is that we can't properly handle an email address with a + in it.

Got it, @Lars ! That is very helpful. Imagining that some number of donors will also be using this little plus sign 'trick,' is it possible to at least suppress them from actually getting the double opt-in automated email? Would it be possible to segment them out to a list that we need to manually contact; that's not ideal, but at least they wouldn't get the confirmation email when we know the button won't work for them.

Thanks much.

@spatton I've just put up a patch to solve this in T417431: Email addresses containing + cannot be double opted in. Just checking in fr-online-email on send timing to see if deploying this on Tuesday is going to take care of it or we need to push it out earlier.

@spatton Above patch has been deployed, so this issue is fixed.