4

We've got some contacts in a search result. Selecting all or checking "All x contacts" and choosing "Email - send now (to 50 or less)" leads to the email screen stating that three of the contacts won't receive the mail. But all of the possible reasons (is_deceased, do_not_email, ...) aren't true. The db says:

select do_not_email, is_deceased, is_opt_out from civicrm_contact where id = x;
+--------------+-------------+------------+
| do_not_email | is_deceased | is_opt_out |
+--------------+-------------+------------+
|            0 |           0 |          0 |
+--------------+-------------+------------+

select email, is_primary, on_hold from civicrm_email where contact_id = x;
+--------------------------------+------------+---------+
| email                          | is_primary | on_hold |
+--------------------------------+------------+---------+
| [email protected]            |          1 |       0 |
+--------------------------------+------------+---------+

The contacts in question are able to receive emails if triggered by »send email«-action in contact's summary and even when selected in the result's list. The problem occurs only when sending to bunch of contacts.

Their email addresses seem valid and do not contain crazy chars.

I just can't find any reason why civi sorts such contacts out. I've read

But nothing helped. Any ideas?

5
  • Could there be illegal characters in the email address such as a space at the end (happens sometime during import)? I guess you made sure contacts are not in trash as well...
    – Fabian
    Commented Jan 11, 2017 at 10:50
  • Just to create a test case. Is the action "Send an email" available from the actions menu when the contact with the email "[email protected]" is selected? Commented Jan 11, 2017 at 19:57
  • No illegal characters, Send email is possible.
    – nielo
    Commented Jan 11, 2017 at 20:36
  • is it definitley something to do with these contacts? If you created a group with all three of them in, searched for members of the group and then chose Email Send Now to 50 or less, does it not send to them? Commented Jan 12, 2017 at 20:06
  • 2
    Since you have used some SQL in your question I am going to make the assumption that you might be OK with PHP as well. If you have a look at github.com/civicrm/civicrm-core/blob/master/CRM/Contact/Form/…, you'll see the reasons that a contact can be excluded from the email (broadly as you have mentioned them). It's probably worth investigating what is happening in that function if you can. Commented Jan 12, 2017 at 20:27

1 Answer 1

5

Thanks to michaelmcandrew's comment I investigated deeper and found the reason being a bug. Created issue https://issues.civicrm.org/jira/browse/CRM-19876 which is really weird but contains a somehow simple patch (https://github.com/civicrm/civicrm-core/pull/9676).

1
  • glad this worked for you. thanks for submitting the patch :) Commented Jan 13, 2017 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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