?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/draft/application/libraries/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sec/draft/application/libraries/mail.php |
<?php class Mail { function send($text, $to, $subject,$from,$fromname,$password,$smtphost) { require_once 'application/swiftmailer/swift_required.php'; //Create the Transport $transport = Swift_SmtpTransport::newInstance ($smtphost, 465, 'ssl') ->setUsername($from) ->setPassword($password); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance(); $message->setSubject($subject); $message->setFrom(array($from => $fromname)); $message->setTo($to); $message->setBody($text,'text/html'); //Send the message $result = $mailer->send($message); } }