python - 有什么方法可以在 Python 中使用 Sendgrid 向具有多个内容的多个收件人发送邮件?
问题描述
例如,如果有一个100 users
where20 users paid their bills
和剩余60 users don't pay their bills
和剩余的列表20 users cancelled their order
。
在这种情况下,前 20 位应收到类似“注册成功”的邮件,其他 60 位用户应收到“请完成付款以继续”,其余 20 位用户应收到“您已成功取消”。
我知道我们可以在一个电话中发送多个收件人。如下所示
message = Mail(
from_email='sender@example.com',
to_emails=[To('test@example.com'), To('test2@example.com')],
subject='Subject line',
text_content='This is the message of your email',
)
但是,有没有办法发送多个内容的多个收件人呢?
解决方案
推荐阅读
- javascript - Javascript 子字符串没有提取正确的数据
- arrays - 将泛型结构附加到数组
- visual-studio - Blazor 的自定义 Visual Studio 项模板
- python-3.x - Pandas - 使用混合类型列样式化数据框
- ios-simulator - 如何向 SimulatorTrampoline 添加权限以访问特定文件夹
- maven - Maven 和 Spring Boot 忽略了 JUnit5 测试
- reactjs - 如何按 id 对这些数组进行分组?
- vimeo - 使用 Vimeo API 获取专辑列表及其视频无法按预期工作
- stata - 根据行中的值连接 ID
- azure - Azure SQL 数据库流量迁移到较新的网关