public function warnBannedUser($post, $new_pid)
    {
        Container::get('hooks')->fire('model.post.warn_banned_user_start', $post, $new_pid);

        // Load the "banned email post" template
//        $mail_tpl = trim(file_get_contents(ForumEnv::get('FORUM_ROOT').'lang/'.User::get()->language.
//            '/mail_templates/banned_email_post.tpl'));
        $mail_tpl = Lang::getMailTemplate('banned_email_post')->text;
        $mail_tpl = Container::get('hooks')->fire('model.post.warn_banned_user_mail_tpl', $mail_tpl);

        // The first row contains the subject
        $first_crlf = strpos($mail_tpl, "\n");
        $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8));
        $mail_message = trim(substr($mail_tpl, $first_crlf));

        $mail_message = str_replace('<username>', $post['username'], $mail_message);
        $mail_message = str_replace('<email>', $post['email'], $mail_message);
        $mail_message = str_replace('<post_url>', Router::pathFor('viewPost', ['pid' => $new_pid]).'#p'.
            $new_pid, $mail_message);
        $mail_message = str_replace('<board_mailer>', ForumSettings::get('o_board_title'), $mail_message);
        $mail_message = Container::get('hooks')->fire('model.post.warn_banned_user_mail_message', $mail_message);

        Container::get('email')->dispatchMail(ForumSettings::get('o_mailing_list'), $mail_subject, $mail_message);
    }