hi,
i have been using for a while now the PHP mail function, so that users from my website can submitted commments to me, which works fine.

What im trying to do now is to use BCC or CC, is this available with this function?

my current code that works is as follows:

$to="me@somedomain.com";
$subject = "Message From Website"; 
$mailheaders = "From: $thereemail <> \n"; 
$mailheaders .= "Reply-To: $thereemail\n\n"; 
mail($to, $subject, $email, $mailheaders); 

thanks for any advice in advance....

    From http://us4.php.net/manual/en/function.mail.php

    / To send HTML mail, you can set the Content-type header. /
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

    / additional headers /
    $headers .= "From: Birthday Reminder <birthday@example.com>\r\n";

    $headers .= "Cc: birthdayarchive@example.com\r\n";
    $headers .= "Bcc: birthdaycheck@example.com\r\n";

    / and now mail it /
    mail($to, $subject, $message, $headers);

    I think I remember hearing about a bug with Bcc -- the recipients aren't hidden? I haven't tried it so I don't know for sure...

      ok thanks, ill have a try

      thanks again

      CC works....but can't seem to get BCC to work, any ideas?

        my experiences with bcc have been trying...

        what i did...and it wasn't the best...but sometimes i've just set up a second sendmail and sent the bcc as a regular email without the additional recipients...

        this might work too...

        in fact...one of my clients...their server absolutely refuses to send me any mail of any sort using mail...so i have to route it to my yahoo account...but everything else works...very strange...

        good luck...vaska

          ok thanks for the advice......i'll have a try....

            a month later
            Write a Reply...