Page MenuHomePhabricator

Formatting issue with Civi recurring expiry/fail email?
Closed, ResolvedPublic

Description

Spinning this off from T276959: Creating exceptions for when to send the recurring expiry/fail email as a more snack-sized question. I got the recurring expiry/fail email on April 11 at a personal Yahoo address, and the complete text appears twice, once normally, and then again with visible tags, like:

//<p>Wikipedia exists thanks to contributions from readers like you.</p>
<p>Thank you again for your support of this mission.</p>
<p>https://donate.wikimedia.org</p>
<p>Sincerely,<br>

There is also visible code at the top:
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8

I had thought this might just be email client weirdness from Yahoo, but we have since seen multiple donors show this from a range of email clients.

946240 - honoria.plus.com
946242 - bigpond.com
947255, 947809 - gmail.com
946560 - btinternet.com

Is there a way to tell whether this is an email client issue, or something to do with code on our end that we could modify? If the latter and it's not a big technical issue, it would be good to adjust the formatting so that donors see the text only once and without code showing.

Event Timeline

Is the takeaway from the discussion of this at the meeting the week before last that no one is able to locate this error? I got the sense that the email team had reviewed their copy. @DStrine has Fr-tech looked at the copy in Civi to see if anything jumps out? And I apologize if you've already confirmed that it has been looked into, and I missed it.

Also, do we know the timeframe for Civi enabling non Fr-Tech users to directly add email copy?

We'll have to look at this again. The email template UI is still a few weeks out.

Hey yall. Can't help here unfortunately-- I did not code these emails. Here's the phab task for when we handed these off for coding originally.

And here's the more recent phab task for the new translations of this auto recurring email (expanded to 22 languages) that have been handed off for coding this week. These need to be coded and put in production, so the above "visible tag" error will hopefully be resolved by the refresh.

DStrine triaged this task as Medium priority.Jun 8 2021, 9:18 PM

Still investigating - looks like these are sent via a different process than we use for the automatic thank you messages. We first combine the text + the HTML using a 'mime' processor and then use a mail sender, using that combined body.

https://pear.php.net/manual/en/package.mail.mail-mime.example.php

The combined body does indeed have the Content-... code at the top. The mail headers are supposed to tell the client reader how to decode the combined body and show either the text or the HTML version, but somehow that's not happening. I'll keep digging to see why that might be.

Thank you @Ejegg this is really great info.

One other quirk we're seeing is a mismatch in the languages for the text and the SL. Donor #955200 got the SL Re: [first name redacted], renew your monthly donation to Wikipedia =?utf-8?Q??= but the text of the email was in French, just fyi.

Huh, that is interesting. Can you post some contact IDs in this task?

Sure thing, they're cid=47502739

Just noting that the issue with the non-french subject is resolved - the issue with some clients not handling the headers we have not yet resolved

It seems that the placement of this part of the headers

Return-Path: donate@wikimedia.org
Reply-To: Wikimedia Foundation <donate@wikimedia.org>
Date: Wed, 14 Jul 2021 11:45:15 +1200
Content-Type: multipart/alternative;
boundary="=_57f6b6426644842d98003b45e520f364"

AFTER the arc-seal stuff is the problem

I'm not yet sure why it's the case but if I move it up some lines it works

I *think* the reason is that one of the headers is missing and is being rendered as an empty line as per below

Subject: Arthur!, renew your monthly donation to Wikipedia

Return-Path: donate@wikimedia.org
Reply-To: Wikimedia Foundation <donate@wikimedia.org>

Ooh, or could it just be an extra newline at the end of the Subject header? Maybe a trim() is all we need?

Change 704447 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Trim message subject

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

Change 704447 merged by Eileen:

[wikimedia/fundraising/crm@master] Trim message subject

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