• I only have two users. Both users are admin. I configured email notification when a new comment is submitted or waiting for moderation at Settings -> Discussion. Both users receive an email. I tried logging in to the other user who do not want to receive emails. The Discussion settings seem to global to both users. When I change on one user, the setting under the other user changed as well. How can I configure per user/author email notification?

Viewing 1 replies (of 1 total)
  • The function that sends the email is wp_notify_postauthor() in wp-includes/pluggable.php. As a pluggable function, you can define your own version in a plugin.

    So you just need to modify this function to only send email if a particular user meta option is set to True. Which means you will also need to modify the user options page so that it’s easy to set or unset this option. See the Settings API for how to do this.

Viewing 1 replies (of 1 total)

The topic ‘Receive two emails when a comment is submitted’ is closed to new replies.