【发布时间】:2019-04-17 18:36:09
【问题描述】:
我正在尝试使用 SES CLI 发送电子邮件附件,但每次邮件到达并打开附件时,我都会在 Adobe 中收到错误:
无法打开文件,因为它不是受支持的文件类型或文件已损坏。
我使用的命令是:
aws ses send-raw-email --raw-message file:///root/AWS/INSPECTOR/message.json
那个文件的内容是:
{
"Data": "From: sender@exmple.com\nTo: recipient@example.com\nSubject: Test email sent using the AWS CLI (contains an attachment)\nMIME-Version: 1.0\nContent-type: Multipart/Mixed; boundary=\"NextPart\"\n\n--NextPart\nContent-Type: text/plain\n\nThis is the message body.\n\n--NextPart\nContent-Type: application/pdf;\nContent-Disposition: attachment; filename=\"report.pdf\";\npath=\"\/tmp\/report.pdf\"\n\n--NextPart--"
}
我在http://docs.aws.amazon.com/cli/latest/reference/ses/send-raw-email.html 看到了该页面,但我无法完全正确地理解语法,因此我们将不胜感激......
【问题讨论】:
标签: amazon-web-services aws-cli amazon-ses