mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fix: PHPMailer is included through composer now
This commit is contained in:
parent
d5880eac8c
commit
af161b5143
@ -8,6 +8,7 @@
|
|||||||
* @link https://my-aac.org
|
* @link https://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use Twig\Loader\ArrayLoader as Twig_ArrayLoader;
|
use Twig\Loader\ArrayLoader as Twig_ArrayLoader;
|
||||||
|
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@ -818,13 +819,16 @@ function getWorldName($id)
|
|||||||
*/
|
*/
|
||||||
function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
|
function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
|
||||||
{
|
{
|
||||||
/** @var PHPMailer $mailer */
|
|
||||||
global $mailer, $config;
|
global $mailer, $config;
|
||||||
|
|
||||||
|
if (!config('mail_enabled')) {
|
||||||
|
log_append('mailer-error.log', '_mail() function has been used, but config.mail_enabled is disabled.');
|
||||||
|
}
|
||||||
|
|
||||||
if(!$mailer)
|
if(!$mailer)
|
||||||
{
|
{
|
||||||
require SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php';
|
|
||||||
$mailer = new PHPMailer();
|
$mailer = new PHPMailer();
|
||||||
$mailer->setLanguage('en', LIBS . 'phpmailer/language/');
|
//$mailer->setLanguage('en', LIBS . 'phpmailer/language/');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$mailer->clearAllRecipients();
|
$mailer->clearAllRecipients();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user