mailing list using php
I have created a mailing list that will take a persons name, email and send a copy to myself and also send a copy of the email to them thanking them for joining or subscribing to the list.
Now the question that I have is, I do not want to receive the same email as the user(which is the thank you for joing email) all I want is the username and email. The only reason why I receive the same email is because I have my address as the bcc:. Here is the code.
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="10%"> </td>
<h1 align="center">Thank you!</h1>
<p align="center"> We've received your request to join our
mailing list for <? echo ("<b>".$status."</b>"); ?>.<br>
Please <a href="index.html">click here</a> to return to the home page.</p>
$recipient .= $email;
$subject = $status. " Mailing list";
//$message .= "<h3>From: ".ucwords(strtolower($name))."</h3>"; Remove comment if you would like to see the applicant's name on email
$message .= "<table border='0'><tr><td>Dear ".$name.", <br>Thank you for joining our ".$status." mailing list.<Br> Hope you like it.</td></tr><tr><td>Please confirm your e-mail address is correct, if not please re-submit your request with the correct e-mail address.<br><a href='mailto:".ucwords(strtolower($name)).rawurlen code(" <").strtolower($email).rawurlencode(">")."?subject =Re:%Mailing%list%'>Email: ".strtolower($email)."</a></td></tr> \n";
$message .= "<tr><td><BR><BR><b>This is an automated response, please do not reply to this message</b></td></tr></table> \n";
$message .= "<tr><td><b>Comments:</b> ".$comments."</td></tr></table>\n";
$headers .= "From: ".$Name." <".strtolower($email).">\n";
$headers .= "bcc: <my email address>\n";
$headers .= "X-Sender: <my email address>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <my email address>\n"; // Return path for errors
/* If you want to send html mail, uncomment the following line */
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
mail($recipient, $subject, $message, $headers);
<td width="10%"> </td>
The code is actually workign wonderfully, I just want ideas on how I can avoid getting the same email as the user.
if anyone can help me I would greatly appreciate it, and thank you.