通过REST API将山d作为单独的消息发送给多个人 [英] Mandrill sending to multiple people as separate message via the REST API

查看:88
本文介绍了通过REST API将山d作为单独的消息发送给多个人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用山d发送邮件.问题是,当我向"to"参数添加多个收件人时,它会多次发送同一封邮件,且"to"列表中的所有收件人都是这样.我希望将同一封邮件分别发送给收件人"列表中的每个人.我想念什么吗?

I'm trying to send out mails using mandrill. The problem is that when I add multiple recipients to the 'to' parameter, it sends out the same mail multiple times with ALL the recepients in the 'to' list. I was expecting the same mail to be sent out individually to every person in the to list. Am I missing something ?

{
    "key": "app-key",
    "template_name": "platform-invite",
    "template_content": [
        {
            "name": "connection",
            "content": "<a class=\"mcnButton \" title=\"Lets Go\" href=\"http://someurl\" target=\"_blank\" style=\"font-weight: normal;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Lets go</a>"
        },
        {
            "name": "mailbody",
            "content": "<p>Hi </p>\n<p>I would like you to be a ... Tic tic tic...</p>"
        }
    ],
    "message": {
        "subject": "My subject line over herer",
        "from_email": "superman@mydomain.co",
        "to": [
            {
                "email": "person1@gmail.com,
                "type": "to"
            },
            {
                "email": "person2@gmail.com",
                "type": "to"
            },
            {
                "email": "person3@gmail.com",
                "type": "to"
            },
            {
                "email": "person4@gmail.com",
                "type": "to"
            }
        ],
        "merge_vars": {}
    },
    "async": false,
    "ip_pool": "Main Pool"
}

推荐答案

您的发送选项将接收者彼此暴露.您可以取消选中该框,以免在收件人"标题中显示所有人的信息.默认情况下,您在帐户中使用在发送选项"中选择的选项.您可以在单个API调用中覆盖所有这些选项.在这种情况下,您可以使用preserve_recipients参数覆盖为您的帐户设置的当前默认值.

There's an option in your Sending Options to expose recipients to one another. You can uncheck that box to not show everyone's information in the 'to' header. The option(s) you select in the Sending Options are used by default for your account. You can override any of these options in individual API calls. In this case, you could use the preserve_recipients parameter to override the current default that's set for your account.

这篇关于通过REST API将山d作为单独的消息发送给多个人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆