Send Newsletter-Email when post changes

Is there a possibility to notify a list of users when a post changes its contents? I am using MailPoet at the moment but tips for any plugin would be helpful.

The newsletter plugins I have found so far only notify when new posts are created. Not when they change.

EDIT: I have tried as well the "Email Post Changes" plugin but it doesn't support a mailing-list and it shows the post changes as colored diff. I would like a newsletter to notify subscribers.

Topic newsletter posts Wordpress

Category Web


You can use a hook developed for such kind of purposes: post_updated

Use this hook whenever you need to compare values before and after the post update.

Lets get some codding:

function mail_on_update($post_ID, $post_after, $post_before){
    if($post_after->post_content !=  $post_before->post_content){
        // wp_mail() , mail() here
    }
}

add_action( 'post_updated', 'mail_on_update', 10, 3 ); // 10 - priority, 3 - qty of parameters passed to action callback.

Put this code in your theme functions.php and modify with conditional logic for mailing.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.