A plugin for WordPress which allows you to send an email to the registered blog users. Users can send personal emails to each other. Power users can email groups of users and even notify group of users of posts.
All the instructions for installation, the support forums, a FAQ, etc. can be found on the plugin home page or on the plugin overview page.
Email Users has language translation support for a number of languages. New languages and updates to existing languages are always welcome. Thank you to the people who have provided these translations.
This plugin is available under the GPL license, which means that it’s free. If you use it for a commercial web site, if you appreciate my efforts or if you want to encourage me to develop and maintain it, please consider making a donation using Paypal, a secured payment solution. You just need to click the donate button on the the plugin overview page and follow the instructions.
Email Users supports a number of filters and actions.
1. Action: mailusers_before_wp_mail – called before wp_mail is called.
1. Action: mailusers_after_wp_mail – called after wp_mail is called.
1. Filter: mailusers_manipulate_headers – called before wp_mail is called.
This example shows how the mailusers_manipulate_headers filter can be used to change the headers to be compatible with wpMandrill. This code could/would be placed in your functions.php file.
/** * wpMandrill needs the recipients in the TO header instead * of the BCC header which Email Users uses by default. This * filter will move all of the recipients from the BCC header * into the TO header and clean up any formatting and then nuke * the BCC header. * */ function mailusers_mandrill_headers($to, $headers, $bcc) { // Copy the BCC headers to the TO header without the "Bcc:" prefix $to = preg_replace('/^Bcc:\s+/', '', $bcc) ; // Empty out the BCC header $bcc = array() ; return array($to, $headers, $bcc) ; } add_filter('mailusers_manipulate_headers', 'mailusers_mandrill_headers', 10, 3) ;
Email Users provides the ability to send email to a very specific set of users using a custom meta filter. To create a special mail list, you will need to add something similar to the following to your theme’s functions.php file or create a separate plugin file.
The mailusers_register_user_custom_meta_filter() and mailusers_register_group_custom_meta_filter() actions each take 3-4 parameters:
1. Label – text that will appear on the WordPress Email-Users menu (users) or in the Recipient List (groups).
1. Meta Key – the meta key to search for in the user meta table.
1. Meta Value – the value to match against in the user meta table.
1. Meta Compare – optional, defaults to ‘=’. The type of comparison to be performed.
This example will filter the user list to only those users where the first name is Alex.
add_action( 'mailusers_user_custom_meta_filter', 'first_name_alex', 5 ); function first_name_alex() { mailusers_register_user_custom_meta_filter('First Name: Alex', 'first_name', 'Alex'); }
Regular SQL comparisons (=, !=, etc.) can be performed. Wildcard matches (LIKE, NOT LIKE) are not supported due to how the WordPress get_users() API currently handles LIKE comparison. A better solution is to use the REGEXP/NOT REGEXP constructs added in WordPress 3.7. Regular Expressions allow you to select groups of users based on matching meta values like first or last name or ranges within them.
add_action( 'mailusers_user_custom_meta_filter', 'first_names_starting_with_anything_but_d', 5 ); function first_names_starting_with_anything_but_d() { mailusers_register_user_custom_meta_filter('First Name: Not D', 'first_name', '^D', 'NOT REGEXP'); } add_action( 'mailusers_user_custom_meta_filter', 'last_names_starting_with_m', 5 ); function last_names_starting_with_m() { mailusers_register_user_custom_meta_filter('Last Name: M', 'last_name', '^M', 'REGEXP'); } 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: Z', 'last_name', '^[S-Z]', 'REGEXP'); }
In addition to filtering on User Meta data to build a custom list of users, you can now define custom groups based on User Meta data.
add_action( 'mailusers_group_custom_meta_filter', 'send_to_fire_department', 5 ); function send_to_fire_department() { mailusers_register_group_custom_meta_filter('Fire Department', 'department', 'fire'); } add_action( 'mailusers_group_custom_meta_filter', 'send_to_police_department', 5 ); function send_to_police_department() { mailusers_register_group_custom_meta_filter('Police Department', 'department', 'police'); }
In addition to defining specific Meta Key and Value pairs, Email Users also supports a filter to generate the Meta Group filters based on a Meta Key. The Meta Key filter supports two optional arguments – a Meta Value and a function callback to generate the label. Neither is required. When the label callback is used, it receives two arguments, both strings, the Meta Key and Meta Value. It must return a string.
// Define action to send to blog followers add_action( 'mailusers_group_custom_meta_key_filter', 'send_to_my_blog_followers', 5 ); function send_to_my_blog_followers() { mailusers_register_group_custom_meta_key_filter('blog_follower'); } function send_to_departments_label($mk, $mv) { return(ucwords($mk) . ' = ' . ucwords($mv)) ; } // Define action to send to departments using custom callback to generate the label add_action( 'mailusers_group_custom_meta_key_filter', 'send_to_departments', 5 ); function send_to_departments() { mailusers_register_group_custom_meta_key_filter('department', null, 'send_to_departments_label'); } function send_to_departments_label($mk, $mv) { return(ucwords($mk) . ' = ' . ucwords($mv)) ; }
New in v4.5.0 is an action, mailusers_update_custom_meta_filters, which can be used to dynamically update Meta Filters before they’re used for recipient selection or email address retrieval. The example below leverages the Meta Key Department and its various values to define and update a new Meta Key called publicworks. Anytime a Group Email is sent or Post/Page notification is initiated, this action will fire and rebuild the publicworks meta key based on the values of the department meta key. This sort of action could be used to create more complex meta value relationships or to integrate other plugins.
add_action( 'mailusers_group_custom_meta_filter', 'send_to_public_works', 5 ); function send_to_public_works() { mailusers_register_group_custom_meta_filter('Public Works', 'publicworks', true); } add_action( 'mailusers_update_custom_meta_filters', 'update_publicworks_meta_filter', 5 ); function update_publicworks_meta_filter() { $pw_mk = 'publicworks' ; $dept_mk = 'department' ; // Define the valid matches - the array keys match user // meta keys and the array values match the user meta values. // // The array could contain a mixed set of meta keys and values // in order to group users based on an arbitrary collection of // user meta data. $publicworks = array( array($dept_mk => 'fire'), array($dept_mk => 'police'), array($dept_mk => 'water and sewer'), array($dept_mk => 'parks and recreation'), ) ; // Remove all instances of the Public Works meta key // to account for employees no longer with Public Works $uq = new WP_User_Query(array('meta_key' => $pw_mk)) ; foreach ($uq->get_results() as $u) delete_user_meta($u->ID, $pw_mk) ; // Loop through the departs and select Users accordingly foreach ($publicworks as $pw) { $uq = new WP_User_Query(array('meta_key' => $dept_mk, 'meta_value' => $pw[$dept_mk])) ; // Loop through the users in the department and tag them as Public Works employees foreach ($uq->get_results() as $u) update_user_meta($u->ID, $pw_mk, true) ; } }
Starting from $0 per month.
Rating
Reviewers
62 reviews
Tags
Developed By
Vincent Mimoun-Prat
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Track and Display Real-Time Visitor Counts Easily
Present Data Effectively & Convert Users With Elegant Charts & Graphs
Add real-time, personalized weather updates effortlessly
Bring TikTok's Dynamism to Your Website with Engaging Slides
Empower Users to Suggest and Vote on Features
Increase Engagements & Social Media Presence With the Feeds Widget
Increase Trust & Improve Credibility To Drive Sales Up
Create Beautiful Linkedin Feeds & Improve User Experience
Bring Focus to Products & Increase Conversions With Product Blobs
AI-Powered Chat for Instant & Efficient Customer Support
Build Custom Website Sections Effortlessly with Section Builder
Track scrolling with a customizable progress bar or indicator
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!