Forgot the mention, such “missing” attachments are zero-byte files when I use the import attachments from
, and that seems to upset DEVONthink a little.
Anyway, after reading @chrillek’s thread about doing a rejig of @mdbraber’s “all in DEVONthink using RTF” method, and their thread about request for access to the source of an e-mail record through scripting, I’m testing doing the latter instead of getting the source from Mail.
Biggest advantages are that:
- I’m only ever in one application
- Which means I don’t need to select, or guess or reference, any given mailbox to find then work on the e-mail’s source
- I won’t need Foundation framework to inherit the “figure out GMT offset for any date” procedure call for the e-mail’s first line I was recreating (as it’s not available in Mail’s AppleScript dictionary, but is in the DEVONthink e-mail record source), so I’m only ever in plain AppleScript
- I don’t need to test whether a message from Mail has attachments or not (I was doing that as a double check in Mail, possibly superfluously), as I’m working on the record that I’ve already tested that for (and only on messages which have attachments being kept in DEVONthink).
Just finalising the rejig, will run it against the most recent mail folder which is currently processing the original way and compare timing - I’m expecting it to be noticeably faster, and it is certainly a much shorter script.
Maybe I’ll have time to include some tagging, I’ve just been laying off that for the moment to not have to learn “yet another thing” right now.
Sean