我想发送一封包含显示名称的发件人(源(地址的电子邮件,如下所示:
const command = new Ses.SendEmailCommand({
Destination: {
ToAddresses: [ 'some-recipient@test.com' ],
},
Source: 'John Doe <jdoe@test.com>',
Message: {
Subject: {
Data: 'some subject',
},
Body: {
Html: {
Data: 'some html message',
}
}
}
})
const response = await this.client.send(command)
然而,这失败了;MessageRejected"回答如果我仅用";jdoe@test.com&";,那么它工作得很好。如何包含显示名称?
请注意,我也尝试了"John Doe" <jdoe@test.com>
,得到了相同的结果。
也许可以试试这个:
"John Doe" <johndoe@example.com>
文件:http://docs.aws.amazon.com/ses/latest/DeveloperGuide/email-format.html
这确实是受支持的。错误在消息属性的其他地方。对于记录,正确的格式是John Doe <jdoe@test.com>
,显示名称周围没有引号。