0
I have a form that sends the data to the administrator, but does not send the copy to the client’s email.
Follows the code:
$to = $email;
$emailoculto = $email;
$subject = "Seu pedido ao restaurante BARDANA - Número do Pedido: 00" .$gerador;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
$headers .= "From: \"{$nome}\" <[email protected]>\r\n";
$headers .= "Cc: <[email protected]>\r\n";
$headers .= "Bcc: {$emailoculto}\r\n";
//mail($to,$subject,$message,$headers);
if(mail($to,$subject,$message,$headers))
{
I found here this idea to put the Bcc
That way, but still not the copy. In the email [email protected] I receive normally, and still appears copy to the client’s email, but in fact it does not send this copy.
Tested with
Bcc: <$emailoculto>\r\n"
? would be right. So lacking the< >
in your Bcc. On the other hand, the{ }
are unnecessary.– Bacco
PS: For a few volumes I suggest using mail twice instead of Bcc, even to avoid "leakage" of headers in buggy implementations (I’ve heard of case of certain mailers that do not delete the Bcc header from ,original message by mistake);
– Bacco
You’re mixing html with php in the line '$headers .= " Bcc: {$emailoculto} r n" ' Close everything right and see if it works.
– Leu Oliveira
Weird, it didn’t really work with "Bcc: <$emailocult> r n";
– Alessandro Ramos
I didn’t understand what it would be like to close up?
– Alessandro Ramos