Answers.Body: <p>In mailing the count of recipients may be different than the count of smart group. The contact in mailing are filtered out if </p>
  
  <ol>
  <li>Contacts email is on hold</li>
  <li>Privacy set to donot email.</li>
  <li>Same email address grouped together (this is configurable via spanner next to 'recipient count' in the mailer)</li>
  <li>Contact doesn't have email id </li>
  </ol>
  
  <p>Cheers</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T06:06:21.573Z
Answers.Text: In this case though, the count of recipients in mailing is higher than it should be, and is including contacts who do not meet the smart group criteria.
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T07:32:40.570Z
Answers.Text: Try resaving the smart group criteria
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T08:59:17.467Z
Answers.Text: 5. contacts with [multiple bulk email addresses](https://civicrm.stackexchange.com/a/342/104)
Answers.UserDisplayName: Francesc Bassas i Bullich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T23:31:56.787Z
Answers.Text: @PradeepNayak is that by going to "Edit smart group criteria"? As I mentioned in my post that shows one contact (the correct number of contacts for the smart group) but then when I try to make a mailing it wants to send to 31 contacts again
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T23:32:37.220Z
Answers.Text: @FrancescBassasiBullich I'm not sure if I'm missing something but I don't think that link/question is relevant to this problem
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T07:52:22.840Z
Answers.Text: I just wanted to complement @PradeepNayak response with another case that the count of recipients may be different than the count of the smart group (or normal group).
Answers.UserDisplayName: Francesc Bassas i Bullich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T07:57:57.577Z
Answers.Text: @josh can you 'Edit smart group criteria' and then from the action drop down select 'Update smart group' ? Please do check if the all the criteria on search form are set
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T07:58:28.897Z
Answers.Text: Make sure you have updated the smart group criteria
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-03T13:39:21.413Z
Answers.Text: Another casuistic to contemplate: contacts that have is_deceased set to NULL https://civicrm.stackexchange.com/a/8187/104
Answers.UserDisplayName: Francesc Bassas i Bullich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-10T05:48:44.070Z
Answers.LastActivityDate: 2019-08-22T03:38:55.040Z
Answers.LastEditDate: 2019-08-22T03:38:55.040Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>I think we've worked it out! A while ago some contacts had been manually added to the Smart Group (their status on the contact list for screenshot 2 showed them as 'Added' rather than 'Smart'). Smart groups don't automatically remove these people, so I've manually removed them which should solve the problem. </p>
  
  <p>Going to avoid manually adding people to Smart Groups now and let them do their thing! </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T07:01:48.047Z
Answers.LastActivityDate: 2019-07-11T07:01:48.047Z
Answers.UserDisplayName: josh
Body: <p>Using Drupal 7.67 and CiviCRM 5.13.5.</p>
  
  <p>We run volunteer inductions, and send an email to all people who have attended volunteer inductions (as per CiviEvent) after the induction. We only run inductions once a month, though there is sometimes a delay of a few days until our volunteer coordinator can send this email to induction attendees.</p>
  
  <p>This is done through sending an email through CiviMail to a Smart Group. (We do it through CiviMail rather than through CiviEvent > Email all participants, because we want to see who opens the email and clicks on particular links). </p>
  
  <p>The smart group has the following criteria:</p>
  
  <pre><code> - Group(s) = Attended volunteer induction - last 7 days ...AND...
   - Group Status 'Added' ...AND...
   - Event Type = Volunteer Induction ...AND...
   - Start Date - greater than or equal to "4th July 2019 12.00 AM" ...AND...
   - End Date - less than or equal to "10th July 2019 11.59 PM" ...AND...
   - Participant Status (ID) In Attended ...AND...
   - Participant is not a Test
  </code></pre>
  
  <p>We use the start date and end date to only select people who have attended a volunteer induction in the last 7 days (the actual group criteria we've configured is "event date: last 7 days including today").</p>
  
  <p>We haven't had a volunteer induction in the last 7 days, apart from a test one I've just made in which there is only one attendee (me).</p>
  
  <p>However I'm seeing huge discrepancies between the number of contacts that should be in the smart group (1 - just me, since the only Volunteer Induction event in the last 7 days is a test one I just made) and the number of contacts that a mailing would be sent to, in CiviMail.</p>
  
  <p><strong>Contacts > Manage Groups</strong></p>
  
  <p>This page shows 32 contacts are in the group (wrong).</p>
  
  <p><a href="https://i.sstatic.net/c8iG6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/c8iG6.png" alt="32 contacts are in the group, according to Contacts &gt; Manage Groups"></a></p>
  
  <p><strong>From that page: "Contacts"</strong></p>
  
  <p>Clicking the "Contacts" link on the aforementioned page/the above screenshot, again shows that there are 32 contacts in the group (wrong).</p>
  
  <p><a href="https://i.sstatic.net/WRKo2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WRKo2.png" alt="32 contacts in the group, again wrong"></a></p>
  
  <p><strong>"Edit Smart Group Criteria"</strong></p>
  
  <p>Clicking the "Edit Smart Group Criteria" page takes me to a new search page that shows there is only one contact in the smart group (the correct number of contacts!). I didn't actually edit any of the criteria, I only clicked the button and it shows me the correct number.</p>
  
  <p><a href="https://i.sstatic.net/dkq98.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dkq98.png" alt="only 1 contact in the group when I click &quot;Edit Smart Group Criteria&quot; -- correct!"></a></p>
  
  <p><strong>CiviMail recipients</strong></p>
  
  <p>However when I go to CiviMail and select the smart group as the recipient, it shows that it will be sent to 31 recipients (??) rather than 1. Looking into the recipients list, the 1 contact that should actually be in the smart group based on the criteria IS in the group, plus another 30 that may have previously met the criteria but don't anymore (based on attendance date).</p>
  
  <p><a href="https://i.sstatic.net/Fgyol.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Fgyol.png" alt="CiviMail shows 31 recipients, rather than 1 recipient"></a></p>
  
  <p><a href="https://i.sstatic.net/cMZ4l.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cMZ4l.png" alt="CiviMail shows 31 recipients, rather than 1 recipient"></a></p>
  
  <p>--</p>
  
  <p>This is pretty perplexing, does anyone know what's happening here? As I mentioned, the extra contacts who are showing up in the group are contacts who previously met the smart group criteria but don't anymore (they attended a volunteer induction a couple months ago, not in the last week). </p>
  
  <p>I do wonder if it's because the smart group is referencing itself... in the criteria I pasted in at the top of this post, the first line seems to imply that contacts who are in the smart group, are ...in the smart group. But in screenshot 3 (under "edit smart group criteria"), that first criteria isn't there any more. </p>
  
Tags: <drupal><civimail><smartgroups>
Title: Discrepancy between # of contacts in smart group vs # of contacts in smart group mailing
ThreadText: # Discrepancy between # of contacts in smart group vs # of contacts in smart group mailing
  
  (Asked by: username_0 on 2019-07-10)
  
  Using Drupal 7.67 and CiviCRM 5.13.5.
  We run volunteer inductions, and send an email to all people who have attended volunteer inductions (as per CiviEvent) after the induction. We only run inductions once a month, though there is sometimes a delay of a few days until our volunteer coordinator can send this email to induction attendees.
  This is done through sending an email through CiviMail to a Smart Group. (We do it through CiviMail rather than through CiviEvent > Email all participants, because we want to see who opens the email and clicks on particular links). 
  The smart group has the following criteria:
   - Group(s) = Attended volunteer induction - last 7 days ...AND...
   - Group Status 'Added' ...AND...
   - Event Type = Volunteer Induction ...AND...
   - Start Date - greater than or equal to "4th July 2019 12.00 AM" ...AND...
   - End Date - less than or equal to "10th July 2019 11.59 PM" ...AND...
   - Participant Status (ID) In Attended ...AND...
   - Participant is not a Test
  
  We use the start date and end date to only select people who have attended a volunteer induction in the last 7 days (the actual group criteria we've configured is "event date: last 7 days including today").
  We haven't had a volunteer induction in the last 7 days, apart from a test one I've just made in which there is only one attendee (me).
  However I'm seeing huge discrepancies between the number of contacts that should be in the smart group (1 - just me, since the only Volunteer Induction event in the last 7 days is a test one I just made) and the number of contacts that a mailing would be sent to, in CiviMail.
  Contacts > Manage Groups
  This page shows 32 contacts are in the group (wrong).
  
  From that page: "Contacts"
  Clicking the "Contacts" link on the aforementioned page/the above screenshot, again shows that there are 32 contacts in the group (wrong).
  
  "Edit Smart Group Criteria"
  Clicking the "Edit Smart Group Criteria" page takes me to a new search page that shows there is only one contact in the smart group (the correct number of contacts!). I didn't actually edit any of the criteria, I only clicked the button and it shows me the correct number.
  
  CiviMail recipients
  However when I go to CiviMail and select the smart group as the recipient, it shows that it will be sent to 31 recipients (??) rather than 1. Looking into the recipients list, the 1 contact that should actually be in the smart group based on the criteria IS in the group, plus another 30 that may have previously met the criteria but don't anymore (based on attendance date).
  
  
  --
  This is pretty perplexing, does anyone know what's happening here? As I mentioned, the extra contacts who are showing up in the group are contacts who previously met the smart group criteria but don't anymore (they attended a volunteer induction a couple months ago, not in the last week). 
  I do wonder if it's because the smart group is referencing itself... in the criteria I pasted in at the top of this post, the first line seems to imply that contacts who are in the smart group, are ...in the smart group. But in screenshot 3 (under "edit smart group criteria"), that first criteria isn't there any more.
  
  **Tags:** drupal, civimail, smartgroups
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-07-11. Score: 3 | Accepted answer
  
  I think we've worked it out! A while ago some contacts had been manually added to the Smart Group (their status on the contact list for screenshot 2 showed them as 'Added' rather than 'Smart'). Smart groups don't automatically remove these people, so I've manually removed them which should solve the problem.
  
  Going to avoid manually adding people to Smart Groups now and let them do their thing!
  
  
  ---
  
  ### Answer by username_1 on 2019-07-10. Score: 1
  
  In mailing the count of recipients may be different than the count of smart group. The contact in mailing are filtered out if
  
  1. Contacts email is on hold
  2. Privacy set to donot email.
  3. Same email address grouped together (this is configurable via spanner next to 'recipient count' in the mailer)
  4. Contact doesn't have email id
  
  Cheers
  
  Pradeep
  
  > **Comments:**
  > **username_0**: In this case though, the count of recipients in mailing is higher than it should be, and is including contacts who do not meet the smart group criteria.  
  > **username_1**: Try resaving the smart group criteria  
  > **username_2**: 5. contacts with [multiple bulk email addresses](https://civicrm.stackexchange.com/a/342/104)  
  > **username_0**: @PradeepNayak is that by going to "Edit smart group criteria"? As I mentioned in my post that shows one contact (the correct number of contacts for the smart group) but then when I try to make a mailing it wants to send to 31 contacts again  
  > **username_0**: @FrancescBassasiBullich I'm not sure if I'm missing something but I don't think that link/question is relevant to this problem  
  > **username_2**: I just wanted to complement @PradeepNayak response with another case that the count of recipients may be different than the count of the smart group (or normal group).  
  > **username_1**: @username_0 can you 'Edit smart group criteria' and then from the action drop down select 'Update smart group' ? Please do check if the all the criteria on search form are set  
  > **username_1**: Make sure you have updated the smart group criteria  
  > **username_2**: Another casuistic to contemplate: contacts that have is_deceased set to NULL https://civicrm.stackexchange.com/a/8187/104  
  
  ---
  
  