Mailing issueshttps://lab.civicrm.org/dev/mail/-/issues2021-11-06T11:30:18Zhttps://lab.civicrm.org/dev/mail/-/issues/14Regression - js error due to alertDismissal setting2021-11-06T11:30:18ZeileenRegression - js error due to alertDismissal settingjs error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/ci...js error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/civicrm\/";
CRM.config.lcMessages = "en_US";
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = "mm\/dd\/yy";
CRM.config.timeIs24Hr = false;
CRM.config.ajaxPopupsEnabled = true;
CRM.config.allowAlertAutodismissal = ;
```
@justinfreeman @monish.deb @JoeMurray - not in released versionMonish DebMonish Debhttps://lab.civicrm.org/dev/mail/-/issues/85Provide warning for mailings that are being edited to prevent Mailing not sav...2022-06-11T14:50:30ZlarsssandergreenProvide warning for mailings that are being edited to prevent Mailing not saved errors.In our org, we have multiple users who might need to edit the same mailing. Unfortunately, this creates the possibility that someone leaves the mailing open and someone else opens it and begins editing, leading to the "Mailing not saved....In our org, we have multiple users who might need to edit the same mailing. Unfortunately, this creates the possibility that someone leaves the mailing open and someone else opens it and begins editing, leading to the "Mailing not saved. Content may be out of date" error (and tears and hair loss due to lost changes). In our case, this is mostly one user putting together a mailing and another user editing it, fixing formatting errors, etc. It's very hard to train users who are used to Google Docs not to leave the tab open, leading to the need for rigid hand off procedures. We've been trying to get people trained for years, but this continues to be an issue that we waste a lot of time on.
Would it be feasible to add some kind of warning that would warn another user who wants to open another mailing that is already open for editing? I'm thinking just setting a flag on the mailing with a 30 minute expiration, which is updated every time the mailing or content is saved. The flag would be unset when the user exits the mailing. Mailings with the flag would have a warning on the draft mailings screen that would say "Someone else may be editing this mailing" or a warning before opening the mailing. This won't be a perfect solution, but I think it would prevent 95% of problems.
We're using Mosaico, but I think this would be implemented in core and apply to both kinds of mailings.https://lab.civicrm.org/dev/mail/-/issues/23Bounce processing doesn't catch pattern "user doesn't exist"2022-06-11T14:50:34ZDetlev SieberBounce processing doesn't catch pattern "user doesn't exist"CiviCRM bounce processing analyzes the bounce text patterns, and decides what kind of bounce type it is. This is a fragile process, but there seems to be no better solution, since there is no general standardization of bounce patterns.
...CiviCRM bounce processing analyzes the bounce text patterns, and decides what kind of bounce type it is. This is a fragile process, but there seems to be no better solution, since there is no general standardization of bounce patterns.
Some email providers throw the bounce pattern "user doesn't exist", which is not found, and therefore results in bounce_type "syntax". However, this bounce pattern should result in immediately switching the email address to "inactive".
Solution is:
> insert into civicrm_mailing_bounce_pattern (bounce_type_id, pattern) values (6, 'user doesn\'t exist');
5.9Monish DebMonish Debhttps://lab.civicrm.org/dev/mail/-/issues/90Make it possible to make a copy of a draft mailing2022-06-11T14:50:38ZlarsssandergreenMake it possible to make a copy of a draft mailingIt would be quite useful to be able to make a copy of a draft mailing. As it stands currently, if you want to duplicate a draft email (for instance, if you want to send two slightly different mailings), you have to send it first and then...It would be quite useful to be able to make a copy of a draft mailing. As it stands currently, if you want to duplicate a draft email (for instance, if you want to send two slightly different mailings), you have to send it first and then reuse it.
I'm not sure if this would be complicated or simple to implement (essentially the same as re-using a mailing or something more complex). Does anyone have thoughts?5.38.0https://lab.civicrm.org/dev/mail/-/issues/34Recipients in smart group are less than actual in group2022-06-11T14:50:39ZGhost UserRecipients in smart group are less than actual in groupFor some reason smart group is only sending to five people even though group has 47 and none have opted out of bulk mailing or email so not sure why the mailing interface is only calculating 5 recipients.
![Screen_Shot_2018-12-20_at_1.0...For some reason smart group is only sending to five people even though group has 47 and none have opted out of bulk mailing or email so not sure why the mailing interface is only calculating 5 recipients.
![Screen_Shot_2018-12-20_at_1.05.06_PM](/uploads/2e3a12989c82f5549079a674b79a8001/Screen_Shot_2018-12-20_at_1.05.06_PM.png)
![Screen_Shot_2018-12-20_at_1.05.35_PM](/uploads/46574d53f23d23c2a1e0a28e780791d7/Screen_Shot_2018-12-20_at_1.05.35_PM.png)https://lab.civicrm.org/dev/mail/-/issues/98Set time limit for bounce types with hold_threshold > 12022-06-11T14:50:53ZMichael McAndrewSet time limit for bounce types with hold_threshold > 1Bounce types can be split into those with a hold_threshold = 1 where a single bounce should cause this contact to be put on hold (e.g. mailbox non existent), and those where more than one bounce is required (mailbox full).
We don't curr...Bounce types can be split into those with a hold_threshold = 1 where a single bounce should cause this contact to be put on hold (e.g. mailbox non existent), and those where more than one bounce is required (mailbox full).
We don't currently set a time limit on those where more than one bounce is required, which is an oversight. For example, the bounce threshold for Mailbox full is 3. This means that as soon as we have received more than 3 mailbox full messages for a contact, their email will be put on hold. This might make sense if it was 3 in the last year, but doesn't really make sense if it was three in the last 10 years.
Similar arguments can be made for other bounce types, like Away, which is set to 30. If I send a fair amount of email to people that are out of the office quite a lot, over time a significant chunk of these will send me > 30 out of the office messages.
Hence we should only consider messages received in a certain time period. I am going to suggest one year. I would be up for making it user configurable (number of days) if people feel strongly about it.
Let me know what you think.https://lab.civicrm.org/dev/mail/-/issues/41Preview as HTML doesn't open window at all2022-06-11T14:50:56ZscardiniusPreview as HTML doesn't open window at allCRM_Mailing_BAO_TrackableURL::getTrackerURL() requires id of mailing but after https://lab.civicrm.org/dev/mail/issues/20 mailing_id is removed from params to Mailing.preview
https://github.com/civicrm/civicrm-core/commit/0075b0cb75e542...CRM_Mailing_BAO_TrackableURL::getTrackerURL() requires id of mailing but after https://lab.civicrm.org/dev/mail/issues/20 mailing_id is removed from params to Mailing.preview
https://github.com/civicrm/civicrm-core/commit/0075b0cb75e5422660366acf280538167369d8ba#diff-d08e5d3ceca1972df6d467b2824ffab5R279
errors from api rest
```
{"error_code":"unknown error","sql":"INSERT INTO civicrm_mailing_trackable_url (url ) VALUES ('https:\/\/onet.pl' )
[nativecode=1364 ** Field 'mailing_id' doesn't have a default value]",
"tip":"add debug=1 to your API call to have more info about the error",
"is_error":1,
"error_message":"DB Error: unknown error",
"debug_information":"INSERT INTO civicrm_mailing_trackable_url (url ) VALUES ('https:\/\/onet.pl' ) [nativecode=1364 ** Field 'mailing_id' doesn't have a default value]"}
```5.12.3https://lab.civicrm.org/dev/mail/-/issues/62Mailing Error when civicrm_mailing_group has duplicate entries of recipient g...2022-06-11T14:51:00ZjitendraMailing Error when civicrm_mailing_group has duplicate entries of recipient groupsI see a number of entries in `civicrm_mailing_group` with same entity_id, entity_table, group_type and mailing_id values.
I think this should've been avoided by civi by making this combination of field as unique keys?
If not - re-using...I see a number of entries in `civicrm_mailing_group` with same entity_id, entity_table, group_type and mailing_id values.
I think this should've been avoided by civi by making this combination of field as unique keys?
If not - re-using such mailings can lead to an error when group_concat exceeds its maximum length of holding the value of group ids at https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/BAO/Mailing.php#L123
```
$dao = CRM_Utils_SQL_Select::from('civicrm_mailing_group')
->select('GROUP_CONCAT(entity_id SEPARATOR ",") as group_ids, group_type, entity_table')
->where('mailing_id = #mailing_id AND entity_table RLIKE "^civicrm_(group.*|mailing)$" ')
->groupBy(['group_type', 'entity_table'])
->param('!groupTableName', CRM_Contact_BAO_Group::getTableName())
->param('#mailing_id', $mailingID)
->execute();
```
Default max length is 1024 which leads to the following error if number of characters are more.
![image](/uploads/37ba0534ca7e4a8ef5a87cc22f413cd3/image.png)
Maybe, we just need to use DISTINCT in the above query? I'll create a PR for it soon.5.26.0https://lab.civicrm.org/dev/mail/-/issues/19Deleting a sent mailing leaves activities with invalid links to a mailing rep...2022-06-11T14:51:01ZlolcodeDeleting a sent mailing leaves activities with invalid links to a mailing report that doesn't workAssuming: Civicrm uses the default setting "Enable CiviMail to create activities on delivery"
If a mailing is created, sent and then deleted then the recipients of that mailing will have activities that link to a mailing report using an...Assuming: Civicrm uses the default setting "Enable CiviMail to create activities on delivery"
If a mailing is created, sent and then deleted then the recipients of that mailing will have activities that link to a mailing report using an invalid id. If the link is followed the error will be:
> Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
> Expected one Mailing but found 0
If clicked from the popup activity view it will just be a network error.
The body of the activity will also be blank after the mailing is deleted.
I am not convinced that allowing sent mailings to be deleted at all is a good design.
Some kind of an archive function might be better.
In the short term however the link should probably be removed from these activities.https://lab.civicrm.org/dev/mail/-/issues/87Multilingual and Mailings: the interface only displays the groups selected in...2022-06-11T14:51:05ZbgmMultilingual and Mailings: the interface only displays the groups selected in a given languageThis is a weird bug:
* Enable multi-lingual, and enable a second language (ex: English & French)
* Create a new mailing while in English
* Add a group to the list of recipients.
* Save the draft
Now switch the interface language to the...This is a weird bug:
* Enable multi-lingual, and enable a second language (ex: English & French)
* Create a new mailing while in English
* Add a group to the list of recipients.
* Save the draft
Now switch the interface language to the other language (ex: French), and edit the mailing. Notice that the group has disappeared. It's not gone, but hidden.
In my case, the mailing was re-used from EN to FR, and since the groups were not visible, and there are different mailing groups for each language, the mailing ended up being sent to both language recipients.https://lab.civicrm.org/dev/mail/-/issues/110CiviCRM bounce processing, processed emails are never deleted from the mailbo...2022-06-11T14:51:06Zjustinfreeman (Agileware)CiviCRM bounce processing, processed emails are never deleted from the mailbox which uses up disk space and provides very little valueCiviCRM bounce processing, processed emails are never deleted from the mailbox which uses up disk space and provides very little value.
Possible solutions:
1. Once a bounce email has been processed it should be deleted from the mailbox,...CiviCRM bounce processing, processed emails are never deleted from the mailbox which uses up disk space and provides very little value.
Possible solutions:
1. Once a bounce email has been processed it should be deleted from the mailbox, or
1. A new Scheduled Job process should be implemented which deletes all processed email which is older than 30 days
Relates to https://lab.civicrm.org/dev/mail/-/issues/108
Agileware Ref: CIVICRM-1977https://lab.civicrm.org/dev/mail/-/issues/76CiviMail flagged URI_WP_HACKED_2 by SpamAssassin2022-06-11T14:51:12ZbrendanspaarCiviMail flagged URI_WP_HACKED_2 by SpamAssassinOverview
----------------------------------------
CiviCRM emails were reported as going to the Spam folder in Gmail. I did some digging with mail-tester.com and found that SpamAssassin is dinging my mailings -1.629 points for the code UR...Overview
----------------------------------------
CiviCRM emails were reported as going to the Spam folder in Gmail. I did some digging with mail-tester.com and found that SpamAssassin is dinging my mailings -1.629 points for the code URI_WP_HACKED_2.
I did some more digging and found this is likely caused by the WP REST API that was integrated into Civi in 5.25. I'm currently running 5.27.0.
Things I have done that have not resolved the issue:
- I have installed the cv-rest-mailing plugin located here: https://develop.tadpole.cc/plugins/cv-rest-mailing
- I have also ran my site against MalCare which returned a Clean rating.
- I have disabled the plugin WP Mail SMTP.
- I have disabled tracing of opens and click throughs.
I have confirmed that this is occurring on 3 of my clients sites all running Civi 5.27.0 with Mosaico.
I have confirmed this on sites that are running gSuite as their email provider as well as sites that are running a local mail exchanger.
The following two Stack Exchange questions are open with no resolution. I confirmed with Heather O. that she is still facing difficulty.
- https://civicrm.stackexchange.com/questions/35064/civimail-tracked-links-in-wordpress-site-are-marked-down-by-mail-tester?r=SearchResults&s=3|14.7395
- https://civicrm.stackexchange.com/questions/36244/spamassassin-marking-mailings-as-compromised-wordpress-site?r=SearchResults&s=1|42.5634
Reproduction steps
----------------------------------------
1. Create a new group called SpamTesting
2. Create a new individual named Spam Tester
3. Add Spam Tester to the Group SpamTesting
4. Give the individual Spam Tester the email address corresponding to https://www.mail-tester.com/
5. Create a new mailing or reuse an existing mailing.
6. Add SpamTesting as a recipient group.
7. Send the mailing immediately
8. Click check your score on Mail-Tester.com
Current behaviour
----------------------------------------
Many CiviCRM mailings are going to spam after upgrading to 5.27.0. Please see attached image.
![SpamAssassin Score](/uploads/f5b1c7397916bc4c45ad2d10d89fcd2f/KrY6G_1_.png)
Expected behaviour
----------------------------------------
Emails should not be getting flagged as a hacked WordPress site.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Mail Server__ : gSuite
* __Browser:__ Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
* __CiviCRM:__ _Master/5.27.1
* __PHP:__ 7.3.14
* __CMS:__ WordPress 5.4.2
* __Database:__ _MySQL 8.0.18
* __Web Server:__ _Apache 2.4.41
Comments
----------------------------------------https://lab.civicrm.org/dev/mail/-/issues/20Preview screen doesn't open until recipients list is built on mail compose sc...2022-06-11T14:52:12ZMonish DebPreview screen doesn't open until recipients list is built on mail compose screenTo replicate the issue:
1. Create a new mailing and fill out everything but not the Recipients field.
2. Now select a recipients group that is either very large or is based on a complex smart group. after selecting it -- click preview...To replicate the issue:
1. Create a new mailing and fill out everything but not the Recipients field.
2. Now select a recipients group that is either very large or is based on a complex smart group. after selecting it -- click preview HTML/Text.
The preview window will not open until the recipient count query has completed. This can also be replicated by setting up a mailing with a large/complex group, saving it, then continuing it and immediately clicking preview. the window will not open until the query completes.Monish DebMonish Debhttps://lab.civicrm.org/dev/mail/-/issues/43Message templates and headers might or might not be processed by Smarty2022-06-11T14:53:51ZmfbMessage templates and headers might or might not be processed by SmartyCIVICRM_MAIL_SMARTY allows the admin to disable Smarty for bulk mail, and some other senders such as CRM_Activity_BAO_Activity::sendEmail() also honor the toggle. However, a message template sent to a contact via CRM_Core_BAO_MessageTemp...CIVICRM_MAIL_SMARTY allows the admin to disable Smarty for bulk mail, and some other senders such as CRM_Activity_BAO_Activity::sendEmail() also honor the toggle. However, a message template sent to a contact via CRM_Core_BAO_MessageTemplate::sendTemplate() will always be processed by Smarty.
Relatedly, some tokens are only available in certain contexts. {domain.address} is not available with CRM_Activity_BAO_Activity::sendEmail() but is available with CRM_Core_BAO_MessageTemplate::sendTemplate().
This leads to some confusion because message templates and headers need to be formatted differently depending on whether or not they will processed by Smarty, but the Civi UI allows them to be sent both ways. CSS needs to be wrapped with {literal} {/literal} when it will be processed by Smarty; when not processed by Smarty, CSS should not be wrapped.
I don't have a solution for this at the moment, but I think it's worth flagging as an issue re: both user experience and developer experience.https://lab.civicrm.org/dev/mail/-/issues/93Include optional unsubscribe group field on regular mailings2022-06-11T14:54:10ZlarsssandergreenInclude optional unsubscribe group field on regular mailingsWhen you create a mailing from search results, you are required to add an unsubscribe group. When you create a regular mailing and add groups to the recipients, you can't specify the unsubscribe group. Sometimes, it would be helpful to b...When you create a mailing from search results, you are required to add an unsubscribe group. When you create a regular mailing and add groups to the recipients, you can't specify the unsubscribe group. Sometimes, it would be helpful to be able to specify an unsubscribe group that is different than the group the contact is a member of. For instance, if you send a mailing to a few groups based on your main mailing list, perhaps a set of smart group that are subsets of the main list, you may want contacts to unsubscribe from your main list instead of the smart group.
Proposal: Add an optional unsubscribe group to all mailings. If it is blank, unsubscribes work as they do now. If it is populated, all recipients are unsubscribed from the unsubscribe group (exactly as this works for a mailing based on a search now).
EDIT: On @JoeMurray's suggestion, contacts would be unsubscribed from both the original group that are recipients of the mailing and the specified unsubscribe group.
I can give this a go if there is support for the concept.https://lab.civicrm.org/dev/mail/-/issues/13All unsubscribe group members are excluded from a mailing with a manually spe...2022-06-11T14:54:13ZlolcodeAll unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart groupAll unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart group.
**To reproduce:** Create a smart group with some members in it. Some mem...All unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart group.
**To reproduce:** Create a smart group with some members in it. Some members may also be added and removed manually as usual. Search for some contacts including some who are in that smart group and choose the action to send/schedule a bulk email. When creating the mail select the Smart group as your unsubscribe group.
**The expected result:** The mailing is not sent to any contacts in the search who are in the smart un-subscribe group with the status "Removed".
**The result:** The mailing is not sent to any contacts in the search who are in the smart un-subscribe group at all.5.2.0https://lab.civicrm.org/dev/mail/-/issues/35Public View link does not show from Scheduled and Sent screen2022-06-11T14:54:16ZseamusleePublic View link does not show from Scheduled and Sent screenWhen you view a list of scheduled and sent mailings you cannot access the Public View url link even tho the code suggests it should be availableWhen you view a list of scheduled and sent mailings you cannot access the Public View url link even tho the code suggests it should be available5.10https://lab.civicrm.org/dev/mail/-/issues/51CiviMail: Provide transparency about (non)recipient details2022-06-11T14:54:19ZtottenCiviMail: Provide transparency about (non)recipient detailsTwo stories which are not-uncommon:
## Story 1
Someone starts using CiviMail. They spend a bunch of time arranging for the list of contacts (e.g. migrating from a previous system) and then go to send a mailing. They start composing a m...Two stories which are not-uncommon:
## Story 1
Someone starts using CiviMail. They spend a bunch of time arranging for the list of contacts (e.g. migrating from a previous system) and then go to send a mailing. They start composing a message and realize that the number of recipients is way off. What's going on? They start searching Google, Stackexchange, etc trying to understand why. Eventually, they learn that there are a half-dozen rules about who gets included or excluded from a mailing. (*Does the contact have an email address? Are they deceased? Have they opted-out of the specific mailing list? Have they opted-out of email generally? Have they had bounces? Does an extension - like GDPR - add more constraints?*) But they haven't solved the issue yet: now they need to figure out which criteria are affecting them, to what extent, and how to adapt.
And of course people have this problem - the "New Mailing" UX only presents the affirmative list of active recipients. It doesn't give any hint or detail about the omitted recipients.
![Screen_Shot_2019-09-03_at_12.58.40_PM](/uploads/5a4333487cef3b3df60c6ddc5bd76f65/Screen_Shot_2019-09-03_at_12.58.40_PM.png)
## Story 2
A new user composes an email blast and discovers this incredible drop-down button with a list of tokens. They start throwing in tokens like there's no tomorrow. The blast goes out, and recipients complain: "Why are you sending me these weird messages with skipped words?"
And, again, of course people have this problem - the "New Mailing" UX lets you choose tokens without knowing if your recipient-data is up to the job.
## Discussion
These two stories are thematically similar: in both cases, we have a long list of potential recipients, and we have obscure/hidden criteria which determines whether the mailing goes out successfully to the target audience.
In both cases, there needs to be more transparency - adding UI-elements/UX-mechanisms to communicate what's going on. For example, the data-table in the pop-up might be updated with more columns/icons/color-coding.
I've logged the issue because I think, at some point, there should be discussion around design/resourcing. I don't want to prejudge that by saying the UX mechanisms to resolve these two issues must or must-not be the same - they might be totally different, or they might be one data-table. Either way, I think it's good to have a record of the issue.
## Related Links
* https://chat.civicrm.org/civicrm/pl/nn5rjzwiz3fc78pgojmhubx89a
* https://civicrm.org/blog/simonparkervitiligosocietyorguk/solution-all-recipients-not-showing-up-for-sending-mass-email
* https://civicrm.stackexchange.com/questions/5086/civimail-does-not-send-to-a-whole-group
* https://civicrm.stackexchange.com/questions/6346/after-import-to-group-individuals-in-that-group-not-showing-up-as-recipients-to
* https://civicrm.stackexchange.com/questions/26320/contacts-visible-in-mailing-list-group-not-on-hold-or-otherwise-dnd-but-skippe
* https://civicrm.stackexchange.com/questions/18199/in-mailing-all-recipients-are-not-showing/18201#18201
* https://civicrm.org/extensions/zombie-check
https://lab.civicrm.org/dev/mail/-/issues/3Improve process for creating plain text version of mailing2022-06-11T14:54:21ZMichael McAndrewImprove process for creating plain text version of mailing## Overview
Convert any html contained in tokens to plain text for plain text emails
## Before
HTML in tokens that contained HTML was being outputted to plain text versions of emails.
## After
HTML in tokens is converted to plain te...## Overview
Convert any html contained in tokens to plain text for plain text emails
## Before
HTML in tokens that contained HTML was being outputted to plain text versions of emails.
## After
HTML in tokens is converted to plain text.
## Technical Details
This issue is NOT about generating plain text and HTML versions of tokens. It is about converting an entire email from HTML to plain text when no plain text version is given. This conversion currently proceeds as follows:
1. Check to see if a plain text version has been submitted. If not
2. Convert the HTML to plain text
3. Do token substitution
The problem is that if the token contains html, that HTML persists in the email. The proposed solution is to do the conversion from HTML to plain text after token substitution, i.e.
1. Check to see if a plain text version has been submitted. If not
2. Convert the HTML to plain text
3. Do token substitution
This patch is split between [PR 12061 on core](https://github.com/civicrm/civicrm-core/pull/12061) and [PR 20 on flexmailer](https://github.com/civicrm/org.civicrm.flexmailer/pull/20).
The flexmailer patch will continue to report a single failure until the core patch is merged, at which point we can hopefully run the tests against flexmailer again and merge this patch.
@totten suggested defining tokens with TokenProcessor, whose tokens auto-convert from HTML to plain text and visa versa. However, I am not sure this is going to work for the following reason. When you convert from HTML to plain text (at least with the HTML to plain text converter that we are using) the structure of the text is altered and links appear at the bottom of the converted text. Therefore, if you run multiple conversions, you will get multiple lists of links scattered throughout the email. Best to do html to plain text conversion at the end of the process.
All this is not to say that one shouldn't define plain text and HTML versions of tokens. I think it is fine to do that if you want to. I just think that automatic conversion of HTML to plain text should happen one time only, after the entire email has been assembled.
Note that [PR 12061 on core](https://github.com/civicrm/civicrm-core/pull/12061) removes the check for nofollow in the email html output of the test CRM_Mailing_BaseMailingSystemTest::testHtmlWithOpenAndUrlTracking. The intent of https://issues.civicrm.org/jira/browse/CRM-21768 is not affected. nofollow still appears in the public view (e.g. http://example.org/civicrm/mailing/view) but it is not tested.
I would have added it to a test of civicrm/mailing/view but I could not find any tests there.
This issue was originally discussed here: https://issues.civicrm.org/jira/browse/CRM-21197 and a PR submitted here: https://github.com/civicrm/civicrm-core/pull/10998. But the PR was rejected because it caused issues with Flexmailer.
Also, on the seperate issue of click tracking plain text emails. @totten - you said [here](https://github.com/civicrm/civicrm-core/pull/10998#discussion_r158175327) that you thought it was a significant policy change. It isn't as significant as you think. *Links that are tracked in HTML continue to be tracked in plain text*. Links that are not tracked in HTML (because they were not in an `<a>` tag) are not tracked in plain text either. i.e. there is no significant loss of functionality.https://lab.civicrm.org/dev/mail/-/issues/96Specifying a "Selection Method" without a location type gives a DB error2022-06-11T14:54:23ZJonGoldSpecifying a "Selection Method" without a location type gives a DB errorSteps to replicate (demo server is fine):
* Create a new mailing.
* Click the wrench next to "Recipients".
* Set a *Selection Method* other than "Automatic" but do not touch *Location Type*.
* Attempt to submit the mailing (or press the ...Steps to replicate (demo server is fine):
* Create a new mailing.
* Click the wrench next to "Recipients".
* Set a *Selection Method* other than "Automatic" but do not touch *Location Type*.
* Attempt to submit the mailing (or press the "X Recipients" to recalculate immediately).
Expected Result:
You should be warned that this is an invalid combination.
Actual Result:
You will get a "Mailing content is out of date, please refresh" error. When you refresh, it turns into a "DB Error: Syntax Error".
This combination generates invalid SQL - but when I went to fix it, I realized it made no sense to have this particular combination. So we should warn the user what exactly went wrong.
![Selection_1115](/uploads/c373c331a713ec9b73f7ef8c17842306/Selection_1115.png)5.40.0JonGoldJonGold