Rebuilding templater to use base PHPMailer class