0
I created a form where the user fills in some information and is sent an email to me with this information. Only at the moment it is only sending to 1 email.
Below follows the code:
<?php
header('Content-Type: text/html; charset=utf-8');
header ("location: sucesso.html");
$radio=$_POST[radio];
$nome=$_POST[nome];
$num=$_POST[num];
$mes=$_POST[mes];
$aviso=$_POST[aviso];
$email=$_POST[email];
$assunto=$_POST[assunto];
$mensagem=$_POST[mensagem];
mail("[email protected]","Chegou um e-mail","
Campo 1: $radio
Campo 2: $num
Campo 3: $nome
Campo 4: $mes
Campo 7: $aviso
");
echo "sua mensagem foi enviada com sucesso!";
?>
How to make him also send the emails to another recipient, only (hidden)?
In case he should send the emails to a common email, and another to a hidden one.
If it’s not a bulk shipment, prefer to use the
mail()
twice separately, because not all mailers respect the hidden copy. In some cases, there is the "leak" of headers, and this may reveal a receiver in thebcc
.– Bacco