<?php
namespace Services;

class MailService {
    public function send(string $to, string $subject, string $body): bool {
        $cfg = require CONFIG . '/app.php';
        $headers  = "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=UTF-8\r\n";
        $headers .= "From: EduSmart SMS <{$cfg['mail_from']}>\r\n";
        return mail($to, $subject, $body, $headers);
    }
}
