<?php

use PHPMailer\PHPMailer\PHPMailer;

// MESSAGE & EMAIL CONFIGURATION FOR SCRIPT
class message{
    private $conn;
    public function send_mail($email, $message, $subject){

        $mail = new PHPMailer();
        //SMTP Settings
        $mail->isSMTP();
        $mail->Host = "mail.terracorefinbank.com"; // Change Email Host
        $mail->SMTPAuth = true;
        $mail->Username = "support@terracorefinbank.com"; // Change Email Address
        $mail->Password = 'TerrPWSec1543@'; // Change Email Password
        $mail->Port = 465; //587
        $mail->SMTPSecure = "ssl"; //tls

        //Email Settings
        $mail->isHTML(true);
        $mail->setFrom('support@terracorefinbank.com','Terracore Finbank'); // Change
        $mail->addAddress($email);
        $mail->AddReplyTo("support@terracorefinbank.com", "Terracore Finbank"); // Change
        $mail->Subject = $subject;
        $mail->MsgHTML($message);
        $mail->Send();


    }

}


?>