'CC' and 'BCC' in mail function
| From: | Sridhar Moparthy | Date: | Fri, 14 Jun 2002 21:01:24 +0000 |
| Subject: | 'CC' and 'BCC' in mail function | ||
| References: | 1 | Groups: | php.general php.windows |
| Request: | Send a blank email to php-general+get-102265@lists.php.net to get a copy of this message | ||
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: my_address@wcom.com\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:dreamboy@aros.net]
Sent: Friday, June 14, 2002 5:11 PM
To: php-general@lists.php.net
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