> > How can send bcc: with mail()?
> >
> From, CC and BCC are headers to be set in the fourth parameter of the
mail()
> function.  Headers must be spearated by end-of-line characters.
>
> $headers = "From: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED]
> BCC: [EMAIL PROTECTED]";
>
> mail($to, $subject, $body, $headers);
>
> There are many other headers that you may find useful that are just as
easy
> to add through the mail() function.

I don't think that'll work. The concept is right, but the way you are typing
it, you're actually adding in two line breaks between each header. That's
going to cause your CC: and BCC: header to show up in the body of the
message because anything after two consecutive line breaks is considered the
body.

You can do it like this:

$headers = "From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
[EMAIL PROTECTED]";

or

$headers = "From: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
BCC: [EMAIL PROTECTED]";

Also, you may want to check the regs on the capitalization of the headers.
If I'm wrong, someone please let me know, but some servers may only accept
Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If
it does, is it only dependant upon the sending SMTP server and not any
servers the message is sent through or the receiving server?

Thanks.

---John Holmes...


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

Reply via email to