gpt4 book ai didi

python - 如何向山魈发送多条消息

转载 作者:太空宇宙 更新时间:2023-11-03 17:38:11 25 4
gpt4 key购买 nike

我有大约 1000 封具有独特内容的独特邮件。我想将它们批量发送到 mandril,即我不想为我发送的每条消息进行单独的网络调用。以下文档显示了 api。但它并没有定义我想要什么。

https://mandrillapp.com/api/docs/messages.python.html

我想要什么

mandrill_client = mandrill.Mandrill('YOUR_API_KEY')
messages ={ message1, message2 ....}

result = mandrill_client.messages.send(messages=messages, async=True, ip_pool='Main Pool', send_at='example send_at')

我找不到上面的内容。但这就是我想要的。

最佳答案

试试这个

 message = {
#other details
'from_email': 'message.from_email@example.com',
'from_name': 'Example Name',
'to': [{'email': 'recipient.email@example.com',
'name': 'Recipient Name',
'type': 'to'},2nd reciepient,....],
}
result = mandrill_client.messages.send(messages=messages, async=True)

关于python - 如何向山魈发送多条消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30921910/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com