CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Recipients excluded after Contributions are made
Pages: [1]

Author Topic: Recipients excluded after Contributions are made  (Read 1087 times)

gaiello

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Recipients excluded after Contributions are made
January 09, 2012, 09:17:46 am
We have a problem with contacts being excluded from email group recipient lists for reasons we have not been able to determine. Our site, viewpointgallery.org, has two groups. What we believe to be validly subscribed contacts are being excluded from mailings when the recipient list is built. The activity that seems to trigger the exclusion is when a contact Contribution gets recorded. Meaning, we can see from the mailing reports and the contact record Activities tab that once a Contribution is made that individual will no longer be included in the recipient lists.

For example, we have tracked that when a contact is subscribed to either or both of the mail groups they get all the mailings just fine. However, if they or we process a Membership (new or renewal) or an Event registration, both of which have payment contributions, they will, from that point forward, be excluded from recipient lists.

The following conditions do NOT apply to these contacts as far as we can tell:

* all excluded groups
* all excluded prior mailings
* contacts who are deceased
* contacts who are in an unsubscribed status in those groups
* contacts who have opted out of all mailings from the org
* contacts whose privacy preferences indicate no mail or bulk mail

The problem occurs 100% of the time (meaning for any contact) when the payments outlined above are made. A real puzzlement for us.

We are using CiviCRM v3.4.7 but the problem started sometime in the past with an earlier version.

Any tips would be greatly appreciated.

Thank you,
George Aiello

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Recipients excluded after Contributions are made
January 09, 2012, 11:52:53 am

your best bet would be to add some debugging code to:

CRM/Mailing/BAO/Mailing.php, function &getRecipients

and see where those contacts are getting excluded and why. Kinda hard to guess whats happening

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gaiello

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Recipients excluded after Contributions are made
January 09, 2012, 01:36:44 pm
Thank you... I'll issue a ticket to our development group. They are not intimately familiar with the CRM code so any particular tips to save them time (and cost) that I could pass along would be most helpful. Otherwise, we'll still get through it and back to you with what we find.

Again, thank you,
George Aiello

Update: I have opened an internal ticket to have one of our developers write out the exclusions created by the function &getRecipients to a text file for review. It may take awhile to get an update to this topic because (a) he needs to write the debugging code, and (b) we'll have to wait for the next broadcast mail to be sent. -George Aiello
« Last Edit: January 09, 2012, 02:09:32 pm by gaiello »

gaiello

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Recipients excluded after Contributions are made
January 30, 2012, 08:43:43 am
We have finally found out what's going on here. It seems that whenever certain activities get posted the civicrm_contact.do_not_email and civicrm_contact.do_not_mail fields change from a value of 0 to null. If we navigate to edit those particular contact records and simply click the "Save" button, those fields return to the proper value of 0.

The CRM/Mailing/BAO/Mailing.php's "Get emails with no override" query where clause includes "AND $contact.do_not_email = 0". Therefore the records that were updated to "null" are excluded.

The database was built by the civicrm install processes not by our DBA (whose on vacation right now). When he gets back we can have him change the db structure of the those two fields to not allow null characters and default to 0. Or, we can change the above query to != 1 and run a cron to fix the null characters. My bigger question is now probably for a different forum, and that is why do those fields get changed from a value of 0 to null in the first place. We notice this on event registrations and memberships that include online payments but it may be occurring elsewhere, too.

Let me know if you have any specific tips.

Thank you,
George Aiello

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Recipients excluded after Contributions are made
January 30, 2012, 10:45:48 am

1. the default values for those fields are 0, not sure how/why/who resets them to null

2. i checked the civicrm.org database which hosts a lot of paid and unpaid events and there were no records with do_not_email == NULL

might want to check the structure of your civicrm_contact table

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gaiello

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Recipients excluded after Contributions are made
January 30, 2012, 11:53:01 am
Yes, when he returns from vacation I plan to have our DBA modify the structure of the civicrm.contact table to set both civicrm_contact.do_not_email and civicrm_contact.do_not_mail to not allow "null" and default to 0. My guess is that will take care of it. In any case, while I wish we knew why and how, now that we know what is happening we have more than one way to remedy it.

Thanks for your help.

-George Aiello

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Recipients excluded after Contributions are made

This forum was archived on 2017-11-26.