I
I
issssrt2016-03-14 10:48:49
PHP
issssrt, 2016-03-14 10:48:49

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

3 answer(s)
R
Rsa97, 2016-03-14
@Rsa97

CC:
BCC:

M
Miku Hatsune, 2016-03-14
@Hatsune-Miku

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 ...

D
Dmitry Rogov, 2016-09-22
@serovko

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 question

Ask a Question

731 491 924 answers to any question