PHPMailer发送到多个地址 [英] PHPMailer sending to multiple address
本文介绍了PHPMailer发送到多个地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用PHPMailer发送电子邮件,我使用这段代码来添加要发送到的电子邮件地址:
I am using PHPMailer to send emails, i use this code to add the email address to send to:
$mail->addAddress("receipent@domain", "receipent");
它适用于一个电子邮件,但不适用于多个电子邮件。
it works for one email but does not work for multiple email.
我收到错误说
i get an error saying
您必须至少提供一个收件人电子邮件地址。 >
You must provide at least one recipient email address.
推荐答案
只需多次使用。
$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient
$mail->addAddress('ellen@example.com');
这篇关于PHPMailer发送到多个地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文