Can AWSLambda read AWSWorkmail emails with attachments

200 views Asked by At

i have are requirement to read email attachments. Extract data from the excel sheet attached in the email and query dynamodb. AWS documentation suggests we can easy ready the email body but does not provide a example to read email attachments.

1

There are 1 answers

0
LazyDeveloper On

After some research we found the solution. You get a message id to get the original message. You can extract the attachments from original message by converting the original message into string and get the exact attachment details in content after "Content-Description: Extract File". Attachments are obtained in base64 and then can be processed.