0

I am trying to find out a way to "email" users when a post is made?

It would be nice to have a drop down menu or check box to check to "email that user" when Publishing a new post?? So I can just check one of the USERS to notify??

Anything like this available? I have found this as a plugin - Email Post Changes -- but it doesn't individualize each post??

2 Answers 2

0

You would want to add a custom meta box that lists all users on the site. Not sure off the top of my head how you would create one that lists users, but it shouldn't be too hard.

You would then run a hook on wp_insert_post that verifies which users have been checked, and sends each of them an email. Something like:

add_action('wp_insert_post', 'my_function');
function my_function()  {
$user_ids = "whatever you saved it as in your custom meta box"; // grab the user ids of who you want to email in an array 

    foreach($user_ids as $user_id)
        $user_data = get_userdata($user_id);
        wp_mail($user_data->user_email, "your subject", "your message");
    }
    return;
}
1
  • excellent info! Will try it out!!
    – eberswine
    Jan 2, 2012 at 1:40
0

FWIK, there is no such plugin for now. You may want to start from 'Monitor Pages' plugin and the one you mentioned to build a new plugin for your specific purpose.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.