Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Dear All,
am trying to send mails as BCC.
[u][b]CODE[/b][/u]
Here first after submitting am requseting all the variables to send mail.
****************************************************************************************Code: Select all
if(isset($_REQUEST['subject']) && isset($_REQUEST['admin']) && isset($_REQUEST['useremail']) && isset($_REQUEST['message']))
{
if(isset($_REQUEST['subject'])) $subject=$_REQUEST['subject']; //Subject
if(isset($_REQUEST['admin'])) $admin=$_REQUEST['admin']; //From - Mail Id
if(isset($_REQUEST['useremail'])) $useremail=$_REQUEST['useremail']; //To - Mail Id
if(isset($_REQUEST['message'])) $message=$_REQUEST['message']; //Message
foreach($useremails as $user_email)
{
$user_email="".$user_email."".",";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'Bcc: $user_email' . "\r\n"; //Bcc
if(mail($useremail, $subject, $message, $headers))
{
echo "<html><body>";
print "<script language=\"javascript\" type=\"text/javascript\">";
print "window.close();";
print "</script>";
echo ("</body></html>");
}
}
}Now problem is am sending mail to "To Mail Id i.e first variable of mail()".
But mail is not going to Bcc(mail id's).
It is coming only to "To Mail Id i.e first variable of mail()".
I think am clear with my problem.
Waiting for your valuable replies to implement this issue.
Thanks and Regards
MADHU
Jcart | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]