* fixed multiple mail recipients when using admin mailer function

It resulted in mail being sent to all users multiple times..
This commit is contained in:
slawkens 2018-06-08 21:08:00 +02:00
parent cb08e53103
commit c863ad460a

View File

@ -810,6 +810,7 @@ function getWorldName($id)
*/
function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
{
/** @var PHPMailer $mailer */
global $mailer, $config;
if(!$mailer)
{
@ -817,6 +818,9 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
$mailer = new PHPMailer();
$mailer->setLanguage('en', LIBS . 'phpmailer/language/');
}
else {
$mailer->clearAllRecipients();
}
$signature_html = '';
if(isset($config['mail_signature']['html']))