PHP - 多个电子邮件地址
问题描述:
这里是我的PHP至今PHP - 多个电子邮件地址
$headers = "From: [email protected]\n";
$headers .= "Reply-To: [email protected]\n";
$headers .= 'Bcc: [email protected]' . "\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=ISO-8859-1\n";
mail($to, $subject, $body, $headers);
我如何三个电子邮件地址添加到这个列表
答
创建遍历数组中的每个项目的电子邮件地址的一个数组,循环并调用mail()
函数。或者像User <[email protected]>, Another User <[email protected]>
这样提交逗号分隔的列表。
如果您的电子邮件“需要”需要发送大量电子邮件,您可能需要查看一些第三方库,因为mail
功能非常“微妙”。
什么名单?这些都不是清单。 – 2011-02-26 02:35:55
这里有一个库,不难学习http://phpmailer.worxware.com/你可以用它等循环等*参见示例* – allenskd 2011-02-26 02:43:59