Question

Please help, my BCC isn't working. What am I doing wrong here? Thanks!

$to = "recepient@email.com";
        $subject = "A message came in from the Website:";

        $message ='{$message}';

        $headers = "MIME-Version: 1.0\r \n";
        $headers .= "Content-type: text/plain; charset=iso-8859-1\r \n";
        $headers .= "From: $name <$email>\r\n";
        $headers .= 'Bcc: myemail@email.com' . " \r\n"; //<- this part is not working :(

        mail($to, $subject, $message, $headers);
Was it helpful?

Solution

The space before your " \r\n" seems to be at fault.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top