C-Command Software Forum

xImporting from Apple Mail: massively confused

The EF manual says: “The recommended way to import from Apple Mail is to select some messages or mailboxes and press the capture key (F1 or fn-F1). EagleFiler will copy the entire message (including attachments) to its library”

In Mail.app, I have a gmail account that is configured in mail’s Preferences-Accounts pane for the account to “Download attachments: All”. I have created a new EF library for this account’s mail. There are no records in the library. I select an email in this account’s Inbox in Mail.app and press the capture key. A notification appears that says the import is complete.

I switch to EF and see one record, the email just imported. I look at the imported email in EF. Under the Cc: list of copied addressees is a paper clip icon and a link whose text is the name of the attachment. I click the link and the email that I imported is opened in Mail.app. This is doubly weird because (1) the PDF is not in the library, and (2) I would expect that clicking on the link would have opened the attached PDF in EF, not the email in Mail.app. The attached PDF is not in the EF library.

Using View-Message-Raw Source, I can see that the MIME-encoded PDF is in the file.

Using View-Message-Quick Look, the first page of the attached PEF is displayed, but I cannot access the rest of the PDF.

I am really confused. My expectation is that, as the manual clearly says, “EagleFiler will copy the entire message (including attachments) to its library”, but this happened only in the sense that attachments are MIME-encoded text within the email, and so, are by definition “copied” into a library.

How do I get the attachment into the EF library in such a way to be able to see the entire attachment in EF and do the usual normal things like searching in it and copying text from it, and as associated with the email and the email thread, and disable or change the behavior of clicking the link causing Mail.app to open the email?

Am I doing something wrong?

What I want to accomplish is importing all of the emails from this account into EF, and archiving, removing, backing up the emails in Mail.app into an archive, deleting the account from Mail.app, and deleting the gmail account completely, so obviously there cannot be any dependencies on anything that is external to EF.

Thanks.

EF 1.8.13 on Mojave 10.14.6.

This is the way it’s intended to work. When you import an e-mail, EagleFiler saves the original source of the e-mail (as received from the mail server). So the PDF file is stored within the e-mail’s file (or in the mailbox file, if you imported multiple messages). Clicking the link views the attachment. The current version of EagleFiler doesn’t know how to save the attachment as a separate file, so it opens the message in your mail client of choice (since mail clients are good at viewing and saving attachments).

The manual emphasizes that point because, although this may seem like common sense or “by definition”:

  • Some other e-mail archiving products do not store the full MIME source (only the text of the message).
  • Mail itself does not store the full MIME message and does not always even store the attachments on disk. So part of the import process is that EagleFiler makes sure that no attachments are missing and reassembles the MIME source.

The attachment is stored in the library, and EagleFiler automatically indexes it for searching. So you can find the e-mail by searching for keywords in the attachment. And you can open the PDF from within Mail to view all the pages, copy text, etc.

If you want the attachment to have its own file icon in the EagleFiler library, outside of the message, you could drag and drop it from Mail into the library. Then the PDF file would become its own record, which you could view in EagleFiler, tag, add notes to, etc.

You can use the Always Open With command to choose a different external app for viewing messages if you don’t want to use Apple Mail.

There is no dependency on Mail after importing. The message and attachment data is stored entirely in EagleFiler. Mail is just acting as a viewer for the message file that’s in EagleFiler, in the same way that when you double-click a PDF file the Preview app is acting as a viewer. You can delete the mail accounts or move your EagleFiler library to a different Mac and still access the message and attachments.

I didn’t know that…

… and forgot about that.

Which is very helpful.

Maybe I’ll take a shot at adding mail attachments to a library by modifying your “Import from Apple Mail” script.

You are right, of course. I guess I was just befuddled by what seemed unexpected behavior, which makes more sense now. Thanks for your help.