PHP邮件多地址
可能的重复项: PHPMailer AddAddress()
这是我的代码。
require('class.phpmailer.php'); $mail = new PHPMailer(); $email = 'email1@test.example, email2@test.example, email3@test.example'; $sendmail = "$email"; $mail->AddAddress($sendmail,"Subject"); $mail->Subject = "Subject"; $mail->Body = $content; if(!$mail->Send()) { # sending mail failed $msg="Unknown Error has Occured. Please try again Later."; } else { $msg="Your Message has been sent. We'll keep in touch with you soon."; } }
如果$email值仅为 1,则会出现问题
。它将发送。但是多个不发送。我该怎么办。我知道在邮件功能中,您必须用逗号分隔多封电子邮件。但是不能在phpmailer中工作。