<?php

require_once("config.php");
require_once("../libs/mailer/class.phpmailer.php");

class Mailer
{
    public function send_mail($support_email, $message, $subject)
    {
        $mail = new PHPMailer();
        $mail->IsSMTP();
        $mail->SMTPDebug = 0;
        $mail->SMTPAuth = true;
        $mail->SMTPSecure = "SMTP";
        $mail->Host = "originalimages.co.ke";
        $mail->Port = 465;
        $mail->Username = "sunflower@originalimages.co.ke";
        $mail->Password = "sunflower2017";
        $mail->addAddress($support_email);
        $mail->SetFrom(EMAIL);
        $mail->AddReplyTo(EMAIL);
        $mail->Subject = $subject;
        $mail->MsgHTML($message);
        return $mail->Send();
    }

}