I'm trying to send email attachments using the SES CLI, but every time the mail arrives and I open the attachment I get an error in Adobe:
could not open the file because it is either not a supported file type or because the file has been damaged.
The command I'm using is:
aws ses send-raw-email --raw-message file:///root/AWS/INSPECTOR/message.json
And the contents of that file is:
{
"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--"
}
I've seen the page at http://docs.aws.amazon.com/cli/latest/reference/ses/send-raw-email.html but I can't quite get the syntax correct, so any help would be appreciated....