我的密件抄送地址收不到电子邮件。我正在使用来自 Lambda 的 SES。
to 收到电子邮件,但 bcc 没有。我也尝试过使用我的个人电子邮件而不是 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'])