You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I investigated the next issue. The Mailer class contains static PHPMailer instance. When user clicks Mail::send() function than the Mailer::send() function is called. The Mailer::send() function calls $mailer->addReplyTo(), $mailer->addCC() and $mailer->addBCC() functions. Because PHPMailer is static it keeps all these recipients and nobody clears them. When server sends emails to users (for example on email validation stage) it becomes insert all these recipients to each concrete email that must be delivered only to single mail box. But now each email contains few recipients.
I fixed this by inserting this 3 lines to the Mailer::send() function:
if (static::validate($mail)) {
$mail = $mail->getMail();
static::$mailer->clearAddresses();
static::$mailer->clearCCs();
static::$mailer->clearBCCs();
Activity