要使用AWS SESv2 CLI向订阅主题的联系人发送电子邮件,可以按照以下步骤操作。
{
"Content": {
"Simple": {
"Subject": {
"Data": "Hello from AWS SESv2 CLI"
},
"Body": {
"Text": {
"Data": "This is the body of the email."
}
}
}
},
"FromEmailAddress": "sender@example.com",
"Destination": {
"ToAddresses": [
"recipient1@example.com",
"recipient2@example.com"
]
}
}
请注意,您需要将sender@example.com
替换为发送方电子邮件地址,并将recipient1@example.com
和recipient2@example.com
替换为接收方电子邮件地址。
aws sesv2 send-email --from-email-address sender@example.com --destination '{"ToAddresses":["recipient1@example.com","recipient2@example.com"]}' --content '{"Simple":{"Subject":{"Data":"Hello from AWS SESv2 CLI"},"Body":{"Text":{"Data":"This is the body of the email."}}}}'
确保将sender@example.com
替换为发送方电子邮件地址,并将recipient1@example.com
和recipient2@example.com
替换为接收方电子邮件地址。
这将使用AWS SESv2 CLI向指定的联系人发送电子邮件。