使用smtp邮件发送多个收件人php

I am using smtp mail, I would like to send mails to multiple receiver. This is the code that I found several days ago.

if($_SERVER["REQUEST_METHOD"] == "GET"):
$to = "ahmad@polymer.com, dwi.hyuga@gmail.com";
$cc = "";
$from = "prod@polymer.com";
$subject = "Daftar PR Karet";
$body = "
Berikut data PR karet pada tanggal $now :

$y

Note : pesan ini digenerate oleh computer.
Terima Kasih,
            ";
    $SMTPMail = new SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, `$SmtpPass, $from, $to, $cc, $subject, $body);`
    $SMTPChat = $SMTPMail->SendMail();
endif;

How can I send mail to multiple recipient? the second email wouldn't sent...

查看全部
dongleibeng5602
dongleibeng5602
2016/11/23 01:34
  • smtp
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复