Are email attachments stored in the .eml file?


I am moving a lot of emails from Gmail accounts to a DEVONthink 3 database. I’m exporting from Gmail using their “Google Takeout” facility. I then import to DEVONthink 3 using the Import/Unix Mailbox command.

The emails are all very happily in DEVONthink 3 and “Show in Finder” reveals each one to be a .eml file.

My question is, are the attachments also in those .eml files?

I suspect the answer is “yes” because the emails with attachments have much larger .eml files than those without attachments. However I would like to have this confirmed because I want to delete all the emails in Gmail and I want to know where the attachments are before I delete those emails at Gmail.

I’m going to ask another question while I’m here concerning the attachments.

I have found that I can export the attachments to, say, the desktop, by simply dragging them from the DEVONthink 3 window. Is there any other way to export attachments?

Thank you!

DEVONthink stores emails always unmodified, therefore whatever Gmail exported gets imported. You can search for emails with attachments e.g. like this: kind:email md_attachments>0

The only other possibility would be AppleScript.

Thank you for your response.

Now I see, of course, it is Gmail which has created the .eml files so of course it is Gmail which will have decided where to put the attachments. I am pretty sure the attachments are in the .eml files because the file sizes for those with attachments are so much bigger than those without.

That trick for searching for attachments is very useful indeed and will be great for my purposes. I think I can easily just drag and drop attachments where I need them having first used that search so I have a list of files that contain them.