[resolved] custom email recipient in comments notification e-mail (3 posts)

  1. crysman
    Posted 3 years ago #

    Please, we are using WP as CMS and we are looking for a way how to customize the comments notification e-mail recipient.

    By default, the post author's e-mail is being used for comments notification. But we need a custom e-mail, or (even better) comma-separated list of e-mails on which to send the notification about new comments. Not only the post author's e-mail.

    How to do it please? Any plugin? Or is there some hook to (that some) WP e-mail notification function which could we use?

  2. x500.net
    Posted 3 years ago #

    WordPress Codex - comment_post

    You can try this:

    add_action('comment_post', 'notify_author_of_reply', 10, 2);
    function notify_author_of_reply($comment_id, $approved){
        $comment = get_comment($comment_id);
          $parent_comment = get_comment($comment->comment_parent);
          wp_mail($parent_comment->comment_author_email, 'Hello', 'Dude you got a reply...');

    source: http://wordpress.stackexchange.com/a/36590

    alternatively, you may be interested in this plugin

  3. crysman
    Posted 3 years ago #

    Thanks for help, that plugin seems to be useful and usable.

Topic Closed

This topic has been closed to new replies.

About this Topic