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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Excluding some email addresses
Pages: [1]

Author Topic: Excluding some email addresses  (Read 260 times)

tastrax

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.5.2
  • CMS version: Wordpress
  • MySQL version: no idea - developers look after that for us
  • PHP version: no idea - developers look after that for us
Excluding some email addresses
February 05, 2015, 02:58:05 pm
HI Folks,

We have a database with about 5000 current members and about 40% of those don't have a legitimate email address. Because we are linked to a wordpress site all these clients have a false email address with some specific text in it so we can find them (wildcare+badmail.... then other text). My problem is we cant seem to work out a search /smart group that only gives us real email addreses.

We can find all the false ones with a LIKE wildcare+badmail% but we cant exclude these from a listing.

"Does not equal wildcare+badmail%" does not work and there doesn't appear to be a NOT LIKE function?

Any clues appreciated

Cheers - Phil

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Excluding some email addresses
February 05, 2015, 03:06:37 pm
This should work if you can 'find' the bad ones:
- Create a smart group from that search.
- For CiviMail mailings, use the Exclude Group option.
- For other purposes (e.g Export ...) - the Include / Exclude Search under Search > Custom Searches should do the trick.
Protect your investment in CiviCRM by  becoming a Member!

tastrax

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.5.2
  • CMS version: Wordpress
  • MySQL version: no idea - developers look after that for us
  • PHP version: no idea - developers look after that for us
Re: Excluding some email addresses
February 05, 2015, 03:32:23 pm
Thanks for that - makes sense but I am still curious why "does not equal wildcare-badmail%" does not exclude these emails.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Excluding some email addresses
February 05, 2015, 03:44:58 pm
Hi Tastrax,

The answer is rooted in how databases interpret "equals" and "does not equal", and isn't specific to CiviCRM.  There's a somewhat technical answer here (check the top-voted answer): http://stackoverflow.com/questions/543580/equals-vs-like
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Excluding some email addresses

This forum was archived on 2017-11-26.