/** * Notify the administrator about new classified * * @param rtComment $comment */ protected function notifyAdministrator($comment) { if (!sfConfig::has('app_rt_comment_moderation_email')) { return; } $from = $comment->getAuthorEmail(); $to = sfConfig::get('app_rt_comment_moderation_email', '*****@*****.**'); $subject = 'New comment requires activation!'; $body = sprintf('A new comment was created by %s (%s)', $comment->getAuthorName(), $comment->getAuthorEmail()) . ":\n\n"; $body .= '--' . "\n\n"; $body .= strip_tags($comment->getContent()) . "\n\n"; $body .= '--' . "\n\n"; $body .= 'Click here if you would like to activate this comment:' . "\n"; $body .= $this->generateUrl('rt_comment_enable', array('id' => $comment->getId()), true); $this->getMailer()->composeAndSend($from, $to, $subject, $body); }