如何在AmazonSESsendSmtpMailforPHP中添加抄送



这是从AWS收到的代码。不确定如何动态添加CC,因为不存在相同的输入字段。我们需要用程序管理吗?或者有其他方法来管理它。

$mail = new PHPMailer();
$mail->IsSMTP();
//$mail->SMTPDebug = 2;
$mail->setFrom($sender, $senderName);
$mail->Username   = $usernameSmtp;
$mail->Password   = $passwordSmtp;
$mail->Host       = $host;
$mail->Port       = $port;
$mail->SMTPAuth   = true;
$mail->SMTPSecure = 'tls';
$mail->addCustomHeader('X-SES-CONFIGURATION-SET', $headers);
// Specify the message recipients.
$mail->addAddress($recipient);
// You can also add CC, BCC, and additional To recipients here.
// Specify the content of the message.

只需在下面添加一个链接,如下所示:

$mail->addAddress($recipient);
$mail->addCC($other_recipient);
(optional)$mail->addBCC($recipient_3);

面临着和你之前一样的困惑:(

相关内容

  • 没有找到相关文章

最新更新