amazon web services - Send email attachment using AWS SES CLI -


i'm trying send email attachments using ses cli everytime mail arrives , open attachment error in adobe saying "could not open file because either not supported file type or because file has been damaged".

the command i'm using is:

aws ses send-raw-email --raw-message file:///root/aws/inspector/message.json

and contents of file is:

{     "data": "from: sender@exmple.com\nto: recipient@example.com\nsubject: test email sent using aws cli (contains attachment)\nmime-version: 1.0\ncontent-type: multipart/mixed; boundary=\"nextpart\"\n\n--nextpart\ncontent-type: text/plain\n\nthis 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 page @ http://docs.aws.amazon.com/cli/latest/reference/ses/send-raw-email.html can't quite syntax correct, appreciated....

the sample tried adapt adds plain text , embeds email. trying add pdf, adding header mail, aren't adding pdfs content.

you need embed pdf base64 encoded well.

doing quick search answer different question "how embed images in email" might embedding. instead of image want embedded pdf in case.

if prepare json , should work aws-cli.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -