You can try something like this in your functions.php
function send_comment_email_notification( $comment_ID, $commentdata ) {
$comment = get_comment( $comment_id );
$postid = $comment->comment_post_ID;
$master_email = get_post_meta( $postid, 'master_email', true);
if( isset( $master_email ) && is_email( $master_email ) ) {
$message="New comment on <a href="" . get_permalink( $postid ) . '">' . get_the_title( $postid ) . '</a>';
add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html";' ) );
wp_mail( $master_email, 'New Comment', $message );
}
}
add_action( 'comment_post', 'send_comment_email_notification', 11, 2 );
Related Posts:
- How to change the email notification recipient (user) for new comments?
- Disable Admin account being emailed for comment notification
- WordPress comments email notification for authors
- Send Notifications to All Admins
- Reply By Email to comment notifications
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Not receiving any e-mails after new comment
- Comment notification not working
- Subscribe to a post’s comments without posting a comment yourself
- How can I edit the email sent when a new comment is received?
- Multiple Comment Moderators and Notifications
- Plugin from WordPress.com for comment notification…available? [closed]
- Follow-up Comments Notification Without a Plug-in
- Reject Comments Based on Author Email
- Same email for all comments
- Error While Sending Comment
- Email notification to an email address other than admin for custom type post comments in wordpress
- Notify post author for a new comment on his post?
- How can the recipients and content for comment email notifications on a custom post type be changed?
- comment reply by email
- Notify comment author upon reply
- How can I get list of emails of users who commented on a post?
- Sent comments notifications to multiple users
- Sending comment notifications to different recipients depending on taxonomy terms
- How to get Post title by locale with Qtranslate-X
- Send email messages after comment was submitted
- How to use filter on comment submission/insert
- New user notification issue
- How to prevent users/authors from seing IP/email of new commentators?
- wp_mail doesnt work inside transition_comment_status
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- wp_trash_post retrashes already trashed comments?
- wp_insert_user email confirmation
- Customize the new comment notifications sent to the post author after the comment is approved
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- How to set SMTP programmatically
- setting comments off as default for pages and custom post types?
- Disable email notification after change of password
- Is it possible to pull comments from facebook into your blog?
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- Alert Email when any Post or Page is Changed
- Do something after sending email
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- How to add headers to outgoing email?
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- Resetting comment count
- When importing – failed to import: Invalid post type feedback
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- wp_mail and BCC headers
- Change Comment Author Display Name
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- How to add internal, revision comments to page updates
- How to load and show comments with AJAX instead of pagination?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all
- comments reply script not working
- How to display comment form error messages in the same page
- Overriding the default WP Multisite notification e-mail
- 3 moderators to approve comment
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to deal with small scale comment spam on small commercial sites? [closed]
- Disable new user notification to admin email
- Send email when a new post is published [closed]
- What should I do to make generated avatars different for anonymous comments?
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Check If comment author is registered
- Comments screen in backend, how to disable email address of commenter for non admins
- How do I override the Message-ID header of wp_mail function?
- Add comments from the admin panel?
- How can I limit the number of comments per registered user per day?
- One comment per user per post but be able to reply to existing comments
- Writing a plugin that notify my friends of new post that mentions(@) them