I am experiencing a weird issue on my CiviCRM 4.7.3 on Joomla 3.5.0 (also happening on some 4.7.8 on Drupal 7)
When I try to send or schedule a mailing and I hit "Send test" I receive an error saying Could not identify any recipients. Perhaps the group is empty?
. However I have selected a group with valid recipients inside (I can see the yellow text near the recipients field saying "~81 recipients").
If I ignore the test and try to send the mailing, it does not give me any errors, but no emails are sent and if I check the report it says:
Intended Recipients 1
Successful Deliveries 0 (0.00%)
The Mail module works - I can send mail through CiviCRM to a contact directly, only through CiviMail there is a problem.
Further debugging information
After a lot of debugging I can narrow the problem down to an ACL issue:
In CRM/Mailing/BAO/MailingJob.php
the deliver()
function is reached but the query ($eq->query
, $eq->fetch
) doesn't return any results.
This is due to the condition from $aclWhere
, for me it is:
( ( `civicrm_group_contact_cache-ACL`.group_id IN (8) ) )
which is joined in the full query by
LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache-ACL` ON contact_a.id = `civicrm_group_contact_cache-ACL`.contact_id
while I do get a contact joined in the query, an entry in civicrm_group_contact_cache
seems to be missing. What is that table for, anyway?