Hi All,

Does any one know how to make mail() function to send mail to 'CC' and 'BCC'
address. I have tried to keep 'CC' and BCC' in header, but it is not
working. Mail function is sending the message to 'To' address but not to
'CC' and 'BCC'.

I am using WinNT, IIS and PHP 4.0.6.

Here is the part of my code.

$to = $HTTP_POST_VARS["to_address"];
$from = $HTTP_POST_VARS["from_address"];
$cc = $HTTP_POST_VARS["cc_address"];
$bcc = $HTTP_POST_VARS["bcc_address"];
$subject = $HTTP_POST_VARS["subject"];
$message = $HTTP_POST_VARS["message"];
$header .= "From: [EMAIL PROTECTED]\r\n";

if ($cc <> "" )
{
        $header .= "Cc: ".$cc."\r\n";
}

if      ($bcc <> "")
{
        $header .= "Bcc: ".$bcc."\r\n";
}

if ($to <>"")
{
        if (mail($to,$subject,$message,$header))
        {
                // Do some thing
        }
        else
        {
                // Do some thing else
        }
}


-----Original Message-----
From: Devin Atencio [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 5:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Chat Program?



Dear PHP Users,

I have a client who currently has a website setup with iChat which
is several years old and we are currently having problems with it. I need
to find a PHP Chat program that will be very easy and simple. I just
wanted to see if anyone here has used a program and really likes
it and can recomment it ?

Devin Atencio

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to