txtTo=email1,eamil2,email3;
foreach (array($_POST["txtTo"]) as $v) {
$strTo = $v;
$flgSend = @mail($strTo,$strSubject,$strHeader1,$strHeader);
if($flgSend)
{
echo "$v Mail send completed.\n<br/>";
}
else
{
echo "$v Cannot send mail.\n<br/>";
}
}
它向所有人发送电子邮件,所以我得到email1,eamil2,email3 Mail send completed.
除了
email1 Mail send completed.
eamil2 Mail send completed.
email3 Mail send completed.
怎么了?怎么给每个人发邮件而不是全部一起发?