试图发送电子邮件地址给两个收件人
问题描述:
星期一2012年4月2日上午9时11分 请我想发送电子邮件给两个收件人,一个是在数据库中,另一个是不是我已经试过这两种语法但他们重新工作不试图发送电子邮件地址给两个收件人
$to = "$email,[email protected]";
and
$to = $email, "[email protected]";
答
简单地传递一个分号分隔的列表:
$to = "[email protected]; [email protected]";
不过请注意,这两个收件人将看到两个不会忽略。如果你不想要这样做,请将第二个收件人添加为BCC(通过BCC: [email protected]
作为mail()
的附加标题)
http://sourceforge.net/projects/phpmailer使用PHP发送电子邮件的库。 – Basti 2012-04-02 08:34:40
@Basti请一直未能弄清楚 – lostty84 2012-04-02 09:13:51
http://phpmailer.worxware.com/index.php?pg=examplebsendmail – Basti 2012-04-02 09:48:58