python - AWS SES 使用密件抄送发送电子邮件
问题描述
我的密件抄送地址没有收到电子邮件。我正在使用 Lambda 的 SES。
收件人收到电子邮件,但密件抄送没有。我也尝试了我的个人电子邮件而不是 trustpilot 的电子邮件来进行测试。
这是功能:
def send_email(to_email, from_email, first_name):
name_displayed = '"Hello World " <' + from_email + '>'
trustpilot_email = 'xxxxxxxx@invite.trustpilot.com'
response = ses_client.send_email(
Source=name_displayed,
Destination={
'ToAddresses': [
to_email,
],
'BccAddresses': [
trustpilot_email,
]
},
Message={
'Subject': {
'Data': 'Hi ' + first_name + 'Welcome to the World!',
'Charset': 'utf8'
},
'Body': {
'Text': {
'Data': 'Hi ' + first_name + ' - Welcome to the World!',
'Charset': 'utf8'
},
'Html': {
'Data': 'Hi ' + first_name + ' - Welcome to the World!',
}
}
},
ReplyToAddresses=[
from_email
],
)
print('email sent', response['MessageId'])
解决方案
推荐阅读
- discord - 如何获取用户发送了多少条消息
- eclipse - pom.xml 标记“缺少工件 com.sun:tools:jar:1.8.0”
- java - 嗨,我在部署 service-api 和 service-service 时使用 liferay 7.3.0 这个错误
- go - 使用通道时的问题:所有 goroutine 都处于睡眠状态 - 死锁
- python - 使用python访问yaml中的元素
- python - 弃用警告:不推荐使用或从 'collections' 而不是从 'collections.abc' 导入 ABC,在 3.8 中它将停止工作
- javascript - 在 CountUp.js 完成计数后解决一个 promise
- node.js - react js中的数据表服务器端处理
- php - Textarea 未在表单中发布值
- jquery - 如何为每个动态创建的“搜索结果块”添加弹出窗口