Title: Create groups
Last modified: June 13, 2017

---

# Create groups

 *  [garyartista](https://wordpress.org/support/users/garyartista/)
 * (@garyartista)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/create-groups-2/)
 * My web host only allows 1000 emails per day. I have 1200 subscribers. Is there
   a way to create a list of subscribers, say from A-K and L-Z?
 * thanks
 * gary

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/create-groups-2/#post-9223935)
 * Yes. You can take advantage of the meta filter capability to divide your users
   into groups. There are examples of using filters on the [plugin’s Description page here on WordPress.org](https://wordpress.org/plugins/email-users/).
   Scroll down to the Custom Filter Usage section.
 *  Thread Starter [garyartista](https://wordpress.org/support/users/garyartista/)
 * (@garyartista)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/create-groups-2/#post-9224023)
 * Thanks for the reply. I am new to this of of coding.
 * If I want to send to people whose display name starts with a-z, would I write
 * add_action( ‘mailusers_user_custom_meta_filter’, ‘username_starting_with_a or
   b or c or d or e’, 5 );
 * function username_starting_with_a-e()
    { mailusers_register_user_custom_meta_filter(‘
   username: A-E’, ‘last_name’, ‘M%’, ‘LIKE’); }
 * Probably wrong and outside the scope of the assistance you offer.
 * thanks for any assistance you can provide
 * gary
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/create-groups-2/#post-9237377)
 * I had to think about this one a bit, sorry for the delayed response. The examples
   I have using the “LIKE” SQL construct won’ work because the [patch I submitted to WordPress 4+ years ago](https://core.trac.wordpress.org/ticket/23373)
   was never incorporated into WordPress Core. I have no idea why, it was supposed
   to happen in 3.6.
 * It turns out WordPress added support for the REGEXP construct in user queries
   in 3.7 and it is actually a better solution than using the SQL LIKE construct.
 * To solve your problem you would do something like this to create a limited user
   distribution list based on last names:
 * add_action( ‘mailusers_user_custom_meta_filter’, ‘last_names_starting_with_s_through_z’,
   5 );
 * function last_names_starting_with_s_through_z()
    { mailusers_register_user_custom_meta_filter(‘
   Last Name: S-Z’, ‘last_name’, ‘^[S-Z]’, ‘REGEXP’); }
 * You would add this code to your theme’s functions.php file or you can create 
   a simple plugin. I have updated the plugin’s ReadMe file with the updated examples
   so the [plugin description page](https://wordpress.org/plugins/email-users/) 
   is now updated as well.
 * I’ve [wrote a post](http://michaelwalsh.org/blog/2017/06/email-users-custom-lists/)
   containing some example images of using the updated custom meta filters on my
   web site.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Create groups’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/email-users_a0e0cf.svg)
 * [Email Users](https://wordpress.org/plugins/email-users/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-users/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-users/)
 * [Active Topics](https://wordpress.org/support/plugin/email-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-users/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/create-groups-2/#post-9237377)
 * Status: not resolved