<?php

use PHPMailer\PHPMailer\PHPMailer;

function setupMail(){

    $mail = new PHPMailer(true);

    $mail->isSMTP();

    /* =========================================
       SMTP CONFIG
    ========================================= */

    $mail->Host       = 'mail.mozabiz.com';

    $mail->SMTPAuth   = true;

    $mail->Username   = 'noreply@mozabiz.com';

    $mail->Password   = 'Norshafiqa@241';

    $mail->SMTPSecure = 'tls';

    $mail->Port       = 587;

    /* =========================================
       GENERAL
    ========================================= */

    $mail->CharSet = 'UTF-8';

    $mail->isHTML(true);

    $mail->setFrom(
        'noreply@mozabiz.com',
        'SEAT System'
    );

    return $mail;
}
?>