0
Guys I’m trying to send several emails with phpmailer, my recipients are receiving them, but to avoid them seeing to whom else I sent the emails, I used the following function:
$email->AddBCC($resultado_nome->email, $resultado_nome->nome);
The problem is that they receive the email with the following:
undisclosed-recipients:;
Good currently I pass the following way:
// Define os destinatário(s)
$consulta_nome = $mysqli->query("select * from cadastro");
while ($resultado_nome = mysqli_fetch_object($consulta_nome)) {
// Destinatório e cópia oculta
$email->AddBCC($resultado_nome->email, $resultado_nome->nome);
// Iremos enviar o email no formato HTML
$email->IsHTML(true);
// Define a mensagem (Texto e Assunto)
$email->Subject = "Nova email";
$email->Body = "emai";
// Envia o e-mail
$email->Send();
}
Is it wrong? That way you send an email to everyone on my registration list
Someone knows how I fix it?
the problem is that I created a page where I check all my system registration and send an email. How do I send 1 email at a time?
– Hugo Borges
@Hugoborges make a
for
in this mailing list and keep firing the emails, but it’s not the best alternative: there is usually a daily limit of emails that you can fire and consume a lot more resources that way. As a rule, what is happening to you is not a problem, it is just a matter of aesthetics. I would prefer the solution of an email in "To". If the answer helped you clarify, give a vote. If that’s what you wanted to know, mark it as a response. Thank you!– Berriel