Answer the question
In order to leave comments, you need to log in
How to send hidden emails with phpMailer?
How to send hidden emails via phpmailer to many subscribers?
In a loop, an email is sent to all subscribers at once $mail->addAddress($emailTo);
But the problem is that all subscribers see other people's emails in the to field. Can you hide it somehow?
Answer the question
In order to leave comments, you need to log in
Well, for example, iterate through the subscribers in a loop and send them individually at each iteration, but if there are a lot of them, the option seems to be not good ...
In order not to display all recipients, it is necessary to clear the buffer after each iteration.
foreach($to as $valueEmail){
$mail->AddAddress($valueEmail['email'], $valueEmail['first_name']);
$res = $mail->Send();
// Clear
$mail->clearAddresses();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question