Updated mail class to use PHPMailer