Fix use of undefined property in mail driver

This commit is contained in:
Kijin Sung 2024-07-21 21:10:37 +09:00
parent 86ab628bcc
commit 5df972606b

View file

@ -13,7 +13,7 @@ class MailFunction extends Base implements \Rhymix\Framework\Drivers\MailInterfa
protected function __construct()
{
include_once \RX_BASEDIR . 'common/libraries/swift_mail.php';
$this->mailer = new \Swift_Mailer(new \Swift_MailTransport);
$this->_mailer = new \Swift_Mailer(new \Swift_MailTransport);
}
/**
@ -23,7 +23,7 @@ class MailFunction extends Base implements \Rhymix\Framework\Drivers\MailInterfa
*/
public static function getName()
{
return 'mail() Function';
return 'PHP mail() Function';
}
/**
@ -60,7 +60,8 @@ class MailFunction extends Base implements \Rhymix\Framework\Drivers\MailInterfa
{
try
{
$result = $this->mailer->send($message->message, $errors);
$errors = [];
$result = $this->_mailer->send($message->message, $errors);
}
catch(\Exception $e)
{