在过去的几个小时里,这个问题真的让我发疯了。为什么使用 Mandrill 发送的电子邮件没有显示有关抄送电子邮件地址的正确信息。
例如,我想发送电子邮件至
当我在receiver_cc_a@mail.com 上看到电子邮件标题时。它总是显示没有抄送,并且该电子邮件发送“到”receiver_cc_a@mail.com,而不是抄送
有没有人有同样的问题?我已经尝试使用 PHPMailer 使用 PHP 发送电子邮件,也尝试使用 Mandrill 本身的 PHP API,但没有成功。
最佳答案
您需要设置选项 preserve_recipients
至 true
.
$message = array(
'html' => '<p>Example HTML content</p>',
'text' => 'Example text content',
'subject' => 'example subject',
'from_email' => 'message.from_email@example.com',
'from_name' => 'Example Name',
'to' => array(
array(
'email' => 'recipient.email@example.com',
'name' => 'Recipient Name',
'type' => 'to'
),
array(
'email' => 'ccrecipient.email@example.com',
'name' => 'Recipient Name',
'type' => 'cc'
)
),
'headers' => array('Reply-To' => 'message.reply@example.com'),
'preserve_recipients' => true
);
关于php - Mandrill 未显示正确的抄送信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42691122/