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 to set SMTP programmatically
- Is it possible to pull comments from facebook into your blog?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to deal with small scale comment spam on small commercial sites? [closed]
- human_time_diff() returns “48 years ago” for all comments
- Allowing more elements in comments via functions.php
- Set post comments open function
- Why are default comments deprecated?
- Comments Reply Form
- Strategies for coping with hyperagressive spambots?
- Get number of comments per page
- WP comments form (custom) is displaying an extra comment field
- WordPress Comment. Need some details of wp_comments DB table
- Sanitizing comments or escaping comment_text()
- Custom disqus_identifier not properly changing default value
- Edit Comment_Field while using T5 Comment Textarea On Top-Plugin
- Registered but Anonymous comments
- Email notification after registration in WordPress
- How can I stop WP from automatically marking “Automatically close comments on articles older than 28 days”? [closed]
- Callback function argument which is required for wp_list_comments ()
- The comment login form is visible to me but not to the user
- How to insert a comma to the child comment construction in function.php?
- Editing WordPress comments : generating comment from selection
- how to properly use comments-template.php
- How can I assign a specific id to the last comment of a post
- Multisite not using subdomains as hostname in from address when sending emails
- delete duplicate comments
- wp_list_comments renders incorrectly nested
- Alternative to the filter comment_reply_link
- Number/ Position of a Comment
- code highiglight not working comment
- Comment number does not increment
- How to edit the text below “Leave a Reply”
- Commenting system for WordPress
- Commentlist: bypostauthor problem with children list
- Comments does not work?
- comment_notes_before not working
- why can’t I retrieve the comment ID?
- get_comment_link without pagination base in the returned URL?
- Comments on future posts
- Copy and Paste Password for Comments
- is it possible to have the full code instead in the comments.php page
- Remove Javascript generated by Comments
- How to Trigger comment_form_after action if comment_form() not used
- Need Comment Link Help
- How to only show current user’s comments and comments on current user’s posts in wp admin
- How to make author comment name to “Editorial Staff” no matter which ever author is replying to comments from his/her account?
- Changing the Comment Fields using Filter (without success)
- How to check if `comment_meta` exists before inserting the comment?
- Comments pagination: reverse JUST the links texts (1-2-3 to 3-2-1), not comments order
- Display date and time into post edit comments section
- Disallowed Tag Present in AMP WordPress ()
- Subcriber getting multiiple notifications for new comments
- Comments/Discussion Not enabled on newly created posts/pages
- wp_mail() not sending emails with ajax
- How can I enable commenting from mobile view?
- Exclude Current user email and send notification
- How to force users to nest their comments
- Comment form – different title if no comment yet
- WordPress Comments jQuery Doesn’t submit
- get_post_meta is always empty when I use wp_mail
- Insert comment and still use moderation
- TinyMCE in comment reply form showing toolbar but can’t edit reply
- Add pending for reply comment in console WordPress