I have a form that sends email normally, but when I put the option to send a copy to the client's email, it does not send. I ran several tests and found that it does not send email to any account other than the server itself. That is, I am getting customer orders, but customers are not getting a copy, as I should receive. What do I do?
$to = $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: $email\r\n"; // remetente
$headers .= 'Cc: [email protected]' . "\r\n";
//mail($to,$subject,$message,$headers);
if(mail($to,$subject,$message,$headers)) {
}
In the $to
part he was to send a copy to the e-mail registered in the form ( $email
)
Thank you for your attention!