Please help -- this may be easy for you, hard for me: Simply want to add code for "Bcc" field in PHP e-mail form so that the form also comes to me (in "bcc"). Is there also a way NOT TO SHOW the "Bcc" field in the message header so the "To" recipient DOESN'T SEE the message also comes to me? Here's the code, please tell me how/where to add the "Bcc" part -- ===== <? $first_name = $_REQUEST['first_name'] ; $last_name = $_REQUEST['last_name'] ; $company = $_REQUEST['company'] ; $emailaddress = $_REQUEST['email'] ; $website = $_REQUEST['website'] ; $textfield = $_REQUEST['textfield'] ; $telephone = $_REQUEST['telephone'] ; $industry = $_REQUEST['industry2'] ; $message = $_REQUEST['message'] ; $message = "$message\n\n$first_name $last_name\n$company\n$industry\n$website\n\n$name\n$textfield $telephone";mail( "to@domain.com", "Company Interest", $message, "From: $emailaddress" ); ?> <script> <!-- window.location= "thankyou.html" //--> </script> <?php exit;?> ===== Thank you very much.
After "From: $emailaddress add the following (within the quotes): \r\nbcc: \r\n and so on. Regards, Dennis M.
Add it to the 'from' section, separated by \r\n: $from = "From: $emailaddress\r\n"; $from .= "Bcc: \r\n"; I think that by definition the BCC won't be shown to the first recipient since that is why BCC exists, but I never actually tested it. edit: post above says the same, posted while I was writing
Dennis M, Rasputin, Thank you very much -- they both worked! Now, last question, what's the code for making the fields required in the PHP form (first name, last name, company, e-mail address, Web site, telephone, industry)? Once more, appreciate it indeed. Cordially, ciao, Jason