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

  • 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 civicrm.stackexchange.com/a/3858/2 – DaveFF Oct 29 '15 at 19:54
  • Thanks DaveFF. This isn't what happened here but your answer may be helpful to others with this problem. – Ben Oct 31 '15 at 15:45

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. 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.

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.

  • Isn't this a bug in import? Maybe it's already been reported. – Paul-Tahoe Oct 30 '15 at 16:40
  • It's long-standing. The issue is that some boolean fields should stay null until filled--saying "I don't know," in a way. – Andrew Hunt Oct 30 '15 at 18:46
  • I will ask our webmaster to do this in the coming days. I don't believe they were imported, but I could be wrong. – Ben Oct 31 '15 at 15:44
  • This is why I write IS NOT TRUE rather than IS FALSE. – DaveFF Oct 31 '15 at 19:24
  • 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. – Paul-Tahoe Nov 4 '15 at 20:27

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+

  • 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.) – Ben Oct 31 '15 at 15:43

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.