0
我使用Sendgrid API发送批量电子邮件,它工作得很完美。现在,客户希望在Sendgrid发送批量电子邮件时向Bcc发送电子邮件。如何在Sendgrid中发送批量电子邮件时添加密件抄送?
这里是我到目前为止已经试过:
$sendgrid = new SendGrid($user_sendgrid, $pass_sendgrid);
$email = new SendGrid\Email();
$email
->setSmtpapiTos($emails)
->setFrom(<Sender Email>)
->setSubject(' ')
->setText(' ')
->addBcc(<Bcc Email>)
->addSubstitution("[firstname]", $firstname)
->addSubstitution("[lastname]", $lastname)
->setHtml(' ');
$sendgrid->send($email);
它发送电子邮件给用户,而不是谁是密送方式之一。
我们之前遇到过这个问题,SendGrid API服务器在发送批量电子邮件时删除重复的'to'收件人,可能与您发生的情况相同,您应该将邮件发送给SendGrid支持团队以了解您的担忧。 –
您也可以拥有看看** sendgrid webapi 3.0 **,docs这里:https://github.com/sendgrid/sendgrid-php,也请试用这个示例代码与JSON请求中有BCC选项在它.. https:// github。 com/sendgrid/sendgrid-php/blob/master/examples/mail/mail.php –
@NishantSolanki我已经检查过,第二个不是批量电子邮件,可以在sendgrid的简单邮件脚本中添加抄送和密件抄送,但我找不到批量电子邮件。 –