PHPMailer的AddAddress() [英] PHPMailer AddAddress()
问题描述
我不知道如何将数据格式化为AddAddress PHPMailer函数;我需要电子邮件发送给多个收件人,所以我试过
$ to =me @ domain.com,you @ domain .NET,她@ domain.it;
$ obj-> AddAddress($ to);
但没有成功。任何帮助将不胜感激。 您想要发送到的邮件地址。这个函数只有两个参数: recipient_email_address
和 recipient_name
。收件人名称是可选的,如果不存在,将不会使用。
$ mailer-> AddAddress(在1:1)
$邮件程序 - > AddAddress(的领导者2 @ domain.com','第二名称');
$邮件程序 - > AddAddress(第三方名称);
您可以使用数组来存储收件人,然后使用 I don't know how the data should be formatted for AddAddress PHPMailer function; I need the email to be sent to multiple recipients so I tried but with no success. Any help will be appreciated. You need to call the You could use an array to store the recipients and then use a 这篇关于PHPMailer的AddAddress()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! / code>循环。我希望它有帮助。
$to = "me@domain.com,you@domain.net,she@domain.it";
$obj->AddAddress($to);
AddAddress
function once for each E-Mail address you want to send to. There are only two arguments for this function: recipient_email_address
and recipient_name
. The recipient name is optional and will not be used if not present. $mailer->AddAddress('recipient1@domain.com', 'First Name');
$mailer->AddAddress('recipient2@domain.com', 'Second Name');
$mailer->AddAddress('recipient3@domain.com', 'Third Name');
for
loop. I hope it helps.