Skip to content

Email-notifications on new comments #200

Closed Answered by xenocrat
eawmaas asked this question in Q&A
Discussion options

You must be logged in to vote

Hello there,

Currently this isn't possible, but it's a good idea for a feature. I will take a look at implementing it for the next release.

In the meantime you can indeed achieve the same thing with a module. It would look like this:

<?php
    class CommentMailer extends Modules {
        public function add_comment($comment) {
            $config = Config::current();
            $mailto = $config->email;

            $email_headers = "From: ".$config->email."\r\n"."X-Mailer: ".CHYRP_IDENTITY;
            $email_subject = _f("New Comment at %s", $config->name, "comments");
            $email_message = _f("%s commented on a blog post:", $comment->author, "comments").
                      …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@eawmaas
Comment options

Answer selected by eawmaas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants