mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
* 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:
parent
693e201900
commit
2010094f83
@ -800,6 +800,7 @@ function getWorldName($id)
|
||||
*/
|
||||
function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
|
||||
{
|
||||
/** @var PHPMailer $mailer */
|
||||
global $mailer, $config;
|
||||
if(!$mailer)
|
||||
{
|
||||
@ -807,6 +808,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']))
|
||||
|
Loading…
x
Reference in New Issue
Block a user