0

Could someone please help me with downloading the attachment( raw MIME) saved to s3 bucket from aws SES. So , I am saving the incoming mails into a s3 bucket , and in case of an attachment it just shows a raw MIME , something like

Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; 
    name="abcd.docx"
Content-Disposition: attachment; filename="abcd.docx"
Content-Transfer-Encoding: base64
X-Attachment-Id: xfjdifdjfj

then I have a base64 encoded raw MIME

I want to extract the attachment part by a lambda function , and save it to another s3 bucket. I can get the file name of the saved mail as "key" metadata in event ( lambda) .

wanted to check how can I extract the attachment part through the lambda function with the help of key I got .

Trevor Tracy
  • 356
  • 1
  • 10
lazarus
  • 677
  • 1
  • 13
  • 27
  • figured out the answer from [related question](https://stackoverflow.com/questions/44389550/extract-and-save-attachment-from-email-via-ses-into-aws-s3) by using python's email package – lazarus Jun 13 '18 at 18:19

1 Answers1

0

figured out the answer from related question

used pythons email package to parse the message further.

lazarus
  • 677
  • 1
  • 13
  • 27