Answers.Body: <p>You may have zombies. I use this term not because it's almost Halloween, but because imports can leave you with undead contacts, and this may be a variation of that.</p>
  
  <p>Boolean (yes/no) fields in CiviCRM have the value 1 or 0, but it's possible in the database for the field to have a null value.  When you create a contact manually, the Is Deceased, Do Not Mail, etc. fields are set to 0, but if you run an import with one of those fields and only mark the dead or no-mail people with 1s, the rest will have the value as null.</p>
  
  <p>When viewing a contact, it will only display deceased or do not mail if those values are 1. When sending email, it will only send if those values are 0.  Hence, you have this mysterious issue.</p>
  
  <p>I suspect you may have imported elected officials, included Do Not Email, but neglected to fill the zeroes where it's okay to email.  Xavier's solution should work: by editing and re-editing the field, you can reset the value.  It gets tedious for a bunch of contacts, though.</p>
  
  <p>In the database you can execute the following query to fix this:</p>
  
  <pre><code>UPDATE civicrm_contact SET do_not_email = 0 WHERE do_not_email IS NULL;
  </code></pre>
  
  <p>Repeat for <code>is_deceased</code> and any others like that you want.  You can also find these contacts in the Search Builder and use Batch Update Via Profile on the results, using a profile with Do Not Email in it.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T16:40:14.237Z
Answers.Text: Isn't this a bug in import?  Maybe it's already been reported.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T18:46:47.313Z
Answers.Text: It's long-standing.  The issue is that some boolean fields should stay null until filled--saying "I don't know," in a way.
Answers.UserDisplayName: Andie Hunt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-31T15:44:03.967Z
Answers.Text: I will ask our webmaster to do this in the coming days. I don't believe they were imported, but I could be wrong.
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-31T19:24:55.493Z
Answers.Text: This is why I write IS NOT TRUE rather than IS FALSE.
Answers.UserDisplayName: DaveFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-04T20:27:27.870Z
Answers.Text: Actually it looks like most of the booleans on contacts are set to default to 0 at the database level.  The only one that isn't seems to be opt_out.  Just to be sure, I tried importing a couple of people one with do not mail =1 and one with it blank.  It came into the db as 0.  So this answer was probably correct at some point but no longer seems to be the case.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-04T21:02:40.740Z
Answers.Text: That's good to know.  It definitely wasn't always the case, but if it worked for you, it sounds like it has been fixed.
Answers.UserDisplayName: Andie Hunt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T13:35:38.960Z
Answers.LastActivityDate: 2015-10-30T13:35:38.960Z
Answers.UserDisplayName: Andie Hunt
Answers.Body: <p>Can you try sending one of the for a single email from their contact record and see if you have the same error message? 
  Just to be 100% sure you have identified one of the broken records.</p>
  
  <p>Can you then edit (not the edit in place fancy version) the full everything on one page one, try to check the on hold and do not mail, check that the email they have is marked as primary+bulk mail (if they have several, try to change the primary one), save, and revert your change then save again</p>
  
  <p>I know it's a bit "can you reboot your computer" type of answer, but sometimes (eg when modifying the contacts via my own custom code or via some extension) some of the underlying data behind the contact record got mingled (eg not having any email marked as primary), and edit and save via the contact record helps to put it in good shape again.</p>
  
  <p>X+</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-31T15:43:07.453Z
Answers.Text: Thanks Xavier. I will try this approach on Monday. I'm not sure how to send them an individual email (technically I know how, but I need to think of something to send them that I can then follow up with to confirm they received it. I'll think of something.)
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T09:15:48.153Z
Answers.LastActivityDate: 2015-10-30T09:15:48.153Z
Answers.UserDisplayName: Xavier
Body: <p>I have a group of elected officials that I regularly email with updates. When I try to contact them, I get the error "Email will NOT be sent to 4 contacts - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased)." However, when I search for contacts matching one or more of those flags + belong to the group I get no results. I figured out which four contacts it is, and there is an email on their profile, the email is not being held, the DO NOT EMAIL box is not checked, and the contact is not marked deceased.
  Is there something else I may be missing? It's pretty important to us to get our messaging to these officials as they hold serious sway over our operations.</p>
  
  <p>This is occurring when viewing the group and clicking "send email to contacts," I have not checked the mass mailing tool.</p>
  
  <p>I'm using civi 4.6.9 on Wordpress 4.1</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-29T19:54:41.977Z
Comments.Text: There are a bunch of ways for someone to not get an email. Most of this was written with CiviMail in mind, but have a look at my answer at http://civicrm.stackexchange.com/a/3858/2
Comments.UserDisplayName: DaveFF
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-31T15:45:04.707Z
Comments.Text: Thanks DaveFF. This isn't what happened here but your answer may be helpful to others with this problem.
Comments.UserDisplayName: Ben
Tags: <email>
Title: Why are contacts not receiving emails when do not email not checked?
ThreadText: # Why are contacts not receiving emails when do not email not checked?
  
  (Asked by: username_0 on 2015-10-29)
  
  I have a group of elected officials that I regularly email with updates. When I try to contact them, I get the error "Email will NOT be sent to 4 contacts - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased)." However, when I search for contacts matching one or more of those flags + belong to the group I get no results. I figured out which four contacts it is, and there is an email on their profile, the email is not being held, the DO NOT EMAIL box is not checked, and the contact is not marked deceased.
  Is there something else I may be missing? It's pretty important to us to get our messaging to these officials as they hold serious sway over our operations.
  
  This is occurring when viewing the group and clicking "send email to contacts," I have not checked the mass mailing tool.
  
  I'm using civi 4.6.9 on Wordpress 4.1
  
  **Tags:** email
  
  > **Comments:**
  > **username_1**: There are a bunch of ways for someone to not get an email. Most of this was written with CiviMail in mind, but have a look at my answer at http://civicrm.stackexchange.com/a/3858/2  
  > **username_0**: Thanks username_1. This isn't what happened here but your answer may be helpful to others with this problem.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-10-30. Score: 5
  
  You may have zombies. I use this term not because it's almost Halloween, but because imports can leave you with undead contacts, and this may be a variation of that.
  Boolean (yes/no) fields in CiviCRM have the value 1 or 0, but it's possible in the database for the field to have a null value.  When you create a contact manually, the Is Deceased, Do Not Mail, etc. fields are set to 0, but if you run an import with one of those fields and only mark the dead or no-mail people with 1s, the rest will have the value as null.
  When viewing a contact, it will only display deceased or do not mail if those values are 1. When sending email, it will only send if those values are 0.  Hence, you have this mysterious issue.
  I suspect you may have imported elected officials, included Do Not Email, but neglected to fill the zeroes where it's okay to email.  username_4's solution should work: by editing and re-editing the field, you can reset the value.  It gets tedious for a bunch of contacts, though.
  In the database you can execute the following query to fix this:
  UPDATE civicrm_contact SET do_not_email = 0 WHERE do_not_email IS NULL;
  
  Repeat for is_deceased and any others like that you want.  You can also find these contacts in the Search Builder and use Batch Update Via Profile on the results, using a profile with Do Not Email in it.
  
  > **Comments:**
  > **username_3**: Isn't this a bug in import?  Maybe it's already been reported.  
  > **username_2**: It's long-standing.  The issue is that some boolean fields should stay null until filled--saying "I don't know," in a way.  
  > **username_0**: I will ask our webmaster to do this in the coming days. I don't believe they were imported, but I could be wrong.  
  > **username_1**: This is why I write IS NOT TRUE rather than IS FALSE.  
  > **username_3**: Actually it looks like most of the booleans on contacts are set to default to 0 at the database level.  The only one that isn't seems to be opt_out.  Just to be sure, I tried importing a couple of people one with do not mail =1 and one with it blank.  It came into the db as 0.  So this answer was probably correct at some point but no longer seems to be the case.  
  > **username_2**: That's good to know.  It definitely wasn't always the case, but if it worked for you, it sounds like it has been fixed.  
  
  ---
  
  ### Answer by username_4 on 2015-10-30. Score: 1
  
  Can you try sending one of the for a single email from their contact record and see if you have the same error message?
  Just to be 100% sure you have identified one of the broken records.
  
  Can you then edit (not the edit in place fancy version) the full everything on one page one, try to check the on hold and do not mail, check that the email they have is marked as primary+bulk mail (if they have several, try to change the primary one), save, and revert your change then save again
  
  I know it's a bit "can you reboot your computer" type of answer, but sometimes (eg when modifying the contacts via my own custom code or via some extension) some of the underlying data behind the contact record got mingled (eg not having any email marked as primary), and edit and save via the contact record helps to put it in good shape again.
  
  X+
  
  > **Comments:**
  > **username_0**: Thanks username_4. I will try this approach on Monday. I'm not sure how to send them an individual email (technically I know how, but I need to think of something to send them that I can then follow up with to confirm they received it. I'll think of something.)  
  
  ---
  
  