<?php

namespace App\Libraries;

class SendEmail
{
    public static function send($to, $msg, $subject): bool
    {
        $send = \Config\Services::email();

        $send->clear();
        $send->setFrom(MAIL_SENDER, APP_NAME);
        $send->setTo($to);
        $send->setSubject($subject);
        $send->setMessage($msg);

        return $send->send();
    }
}
