public function notificationSender($comment, $recipient)
    {
        $sender = $this->owner->config()->default_notification_sender;

        // Do hostname substitution
        $host = isset($_SERVER['HTTP_HOST'])
            ? preg_replace('/^www\./i', '', $_SERVER['HTTP_HOST'])
            : 'localhost';
        $sender = preg_replace('/{host}/', $host, $sender);

        $this->owner->invokeWithExtensions('updateNotificationSender', $sender, $comment, $recipient);

        return $sender;
    }