Mass E-mail sender just to WPMU users

Hello Guys!!!

I have a live project running with BuddyPress+WPMU, I’m going to insert a new feature just to users who have blogs… So, if I use Mass E-Mail sender plugin can I send e-mail just to users who have blogs instead of All users in buddypress and wpmu?


  • Patrick
    • Support Monkey

    Hey there @derek

    I hope you are having a great day!

    Mass Email Sender is a very simple plugin that enables you to send a blast to all users in a single click. Done.

    If you want more fine-grained control over who gets the emails, and who can subscribe, have a play with our eNewsletter plugin.

    No matter who is subscribed to whatever lists (groups) you set up, you can override that and send a newsletter to all admins only.

    It also allows you to send to specific user roles, and it integrates with Membership so you can send stuff to only users on specified subscription plans.

    Cool stuff!

  • Vaughan
    • Support/SLS MockingJay

    Hi @derek,

    Currently this isn’t possible, the plugin will send emails to all users (provided they have selected yes to receive admin emails on their user profiles.

    you might be better using E-newsletter, where you could send to specific user roles or groups.

    However, that wouldn’t necessarily send to blog owners, as a blog doesn’t actually have a blog owner, any administrator of each blog is considered as the owner.

    I’m not sure if you could modify it to check for capability & also detect if their primary_blog is set as anything other than 1 (main site).

    Maybe changing these lines in mass-mailer.php

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}mass_mailer SET email_optout = %s WHERE email_user_id = %d", get_user_meta( $current_user->ID, 'recieve_admin_emails', true ), $current_user->ID ) );

    Replace with:

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}mass_mailer as mailer, {$wpdb->base_prefix}usermeta as usermeta SET mailer.email_optout = %s WHERE mailer.email_user_id = %d AND (usermeta.meta_key = 'primary_blog' AND usermeta.meta_value <> 1 AND usermeta.meta_key = '{$wpdb->base_prefix}capabilities' LIKE '%administrator' AND usermeta.user_id = %d)", get_user_meta( $current_user->ID, 'recieve_admin_emails', true ), $current_user->ID, $current_user->ID ) );

    I haven’t tested that though.

    However, let me just ask one of our developers if he has a better suggestion.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.