ded Posted January 23, 2009 Share Posted January 23, 2009 I want the email address ($email) to be put into a Bcc. What do i need to add? <?php $msg = $_REQUEST['message']; $email = $_REQUEST['emailaddr']; $from = $_REQUEST['from']; $attachment = $_FILES['attachment']['tmp_name']; $attachment_name = $_FILES['attachment']['name']; echo "Bulk email has been sent. Thank You!"; if (is_uploaded_file($attachment)) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); } $headers = "From: $email\n"; $headers .= "Reply-To: $email\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"----=MIME_BOUNDRY_main_message\"\n"; $headers .= "X-Sender: $from<" . $_POST['email'] . ">\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: <" . $_POST['email'] . ">\n"; $headers .= "This is a multi-part message in MIME format.\n"; $headers .= "------=MIME_BOUNDRY_main_message \n"; $headers .= "Content-Type: multipart/alternative; boundary=\"----=MIME_BOUNDRY_message_parts\"\n"; $message = "------=MIME_BOUNDRY_message_parts\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; $message .= "$msg\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_message_parts--\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message\n"; $message .= "Content-Type: application/octet-stream;\n\tname=\"" . $attachment_name . "\"\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "Content-Disposition: attachment;\n\tfilename=\"" . $attachment_name . "\"\n\n"; $message .= $data; $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message--\n"; mail($email, $subject, $message, $headers); ?> Regards, DED Link to comment https://forums.phpfreaks.com/topic/142166-php-mail/ Share on other sites More sharing options...
uniflare Posted January 23, 2009 Share Posted January 23, 2009 search the forum. this has been discussed within the last 24 hours. google is also a good friend. not saying go away or anything ust, try to help yourself Link to comment https://forums.phpfreaks.com/topic/142166-php-mail/#findComment-744705 Share on other sites More sharing options...
ded Posted January 23, 2009 Author Share Posted January 23, 2009 Will do....thank you Link to comment https://forums.phpfreaks.com/topic/142166-php-mail/#findComment-744713 Share on other sites More sharing options...
uniflare Posted January 23, 2009 Share Posted January 23, 2009 ok im feeling nice lol: http://www.phpfreaks.com/forums/index.php/topic,235373.0.html this was on the first page of this forum Link to comment https://forums.phpfreaks.com/topic/142166-php-mail/#findComment-744721 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.