When using a smart group as a mailing, users whose state changes after the mailing is created but before the mailing is sent are not correctly counted
CiviCRM 5.8.2 on Drupal 7.
When a mailing is created with a smart group and is scheduled to be sent in the future, user state changes between the time the mailing is created and the time it is sent do not get accounted for:
- If a user is added to the smart group in that period, they do not get the mailing.
- If a user's private settings change (e.g. do not mail is checked) in that period, they receive the mailing anyway.
- If a user is removed from the smart group in that period, they do get the mailing.
Problem 3 may be resolved by #28 (moved). Problem 2 is an edge case, albeit an important one. Problem 1 is a challenge for our organization, as we frequently pre-create marketing emails for our events months in advance during our slow periods, only to have them not reach newly added community members when they are finally sent.
Not more than a dabbler at development so cannot offer a PR. We would be willing to kick in some funding to have this resolved so that we can create marketing emails when we want, and have them reach all users in the smart group as per the group membership at the time of sending. (Within reason, does not have to be "real time" but the group membership as of an hour or so before sending is fine. Perhaps a cron job to update the mail job's recipient list would suffice?)