0

hi
i want to send mail to more than one user.the below code is not working.please do tell me how to do tat

<?
    $to  = "s@gmail.com";// note the comma
    $bcc = "s@gmail.com";
    $from="l.w@cs.com";
	$spaces="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	$sub="hi bye";
	$body="<html><head></head><body>";
	$body.="<span style='text-align: left;text-indent: 5px;font-family: Verdana;font-size: 11px;color: #404040;'>";
	$body.="Hi Client: <br /><br /> $spaces I have prepar<br />$spaces $spaces Kind regards,<br />";
	$body.="<br /><b>Thanks,</b><br /><b>Agreements Mgmt group</b><br />";
	$body.="</span></body></html>";
 	$headers = "MIME-Version: 1.0\r\n";
	$headers .= "Content-Type: text/html; charset=iso-8859-1" . "\r\n";
 	$headers .= 'From: ' . $from . "\r\n" .
 	$headers .= 'Bcc: ' . $bcc . "\r\n" .
    	'X-Mailer: PHP/' . phpversion();
    $mailstatus=mail($to,$sub,$body,$headers);

?>
3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by nikesh.yadav
0

Well no. That wouldn't work, seeing as you only specify one email recipient.

It should be something like: $to = "user@example.com, [email]anotheruser@example.com[/email]"

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.