If you’re not being prompted to fill in an email address when you comment, then the comment form is most likely reading a cookie from a previous comment. You might try deleting all your cookies, and posting a new comment to ensure the proper email is being used.
Here’s a modified version of this plugin:
<?php
/*
Plugin Name: not-to-me
Plugin URI: https://www.skippy.net/
Description: suppress emails to post authors and blog admin when they comemnt
Version: 1.0
Author: Scott Merrill
Author URI: https://www.skippy.net/
*/
add_action('comment_post', 'not_to_me');
function not_to_me($ID = 0) {
global $cache_settings;
$blog_email = get_settings('admin_email');
$admin = get_userdata(1);
$admin_email = $admin->user_email;
$post_author = get_the_author_email();
$comment = get_commentdata($ID, 1, 1);
$comment_author = $comment['comment_author_email'];
if ( ($comment_author == $blog_email) || ($comment_author == $admin_email) || ($comment_author == $post_author) ) {
$foo = get_settings('comments_notify'); // make sure it's cached
$cache_settings->comments_notify = 0;
}
return $ID;
}
?>
If you want to test whether the if() condition is true (which means that the comment email is coming from either the blog admin email, the admin user’s email, or the post author’s email), insert the following line just after the if() :
die('Yes!');
That will halt execution of the plugin (and WordPress) and dislpay “Yes!”. If you see “Yes”, and then remove that line and _still_ get email notifications, then some other thing is happening… Perhaps another plugin? Maybe “subscribe to comments” ?