any one use BCC with MAIL()?

php Canada
  • 17 years ago

    i am trying to use bcc so i can see if my pitch to the client is having an effect...but trying this does not seem to work:


    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\n";
    $headers .= "From: $fname $lname <$email>\nX-Mailer: PHP Automated Mailer";
    $headers .= "bcc: $bcc\n";


    what have i got wrong?


    TIA

  • 17 years ago

    Can be a bit more detailed with your question plz. ??

  • 17 years ago

    It looks like you've missed out the \n after the x-mailer header.


    the code should be:

    Code:

    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html;charset=iso-8859-1\n";
    $headers .= "From: $fname $lname <$email>\n";
    $headers .= "X-Mailer: PHP Automated Mailer\n";
    $headers .= "bcc: $bcc\n";


    if that doesn't fix it you try replacing the \n's with \r\n

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An expert is a man who has made all the mistakes that can be made in a very narrow field” - Niels Bohr