I'm trying to send multiple emails with phpmailer, my recipients are receiving them, but to prevent them from seeing who else I've sent the emails to, I've 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:;
Well, I currently do this as follows:
// 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 I'll send an email to everyone on my mailing list.
Does anyone know how to solve this?