Two-part question concerning Mail Rule scripts:
First, is it possible to “import” an email from Mail into DevonThink directly as an rtfd? I.e., the Mail Rule script would “create record with {name:theSubject & “.rtfd”, type:rtfd, …”. I nearly always convert my imported emails to rtfd (and then delete the eml records) so I can add text without needing an annotation file. Can I eliminate the convert and delete steps by “importing” already converted?
Second, the various Mail scripts follow the creation of the .eml record by the command: “perform smart rule trigger import event record theRecord”. Since no smart rule name is specified, this means “All smart rules are used” according to the DTP AppleScript dictionary. I’m uncertain about what the “trigger import event” clause means in conjunction with “all smart rules.” Is this supposed to trigger any and all smart rules that have “On Import” as a trigger?
Here’s what I want to do:
- Have a Mail Rule run an “Add messages to DevonThink” script to import new email into my database Inbox.
- The import event should then trigger a smart rule that will convert the .eml record into .rtfd (if necessary), then carry out further actions on the rtfd depending on the smart rule criteria. I can’t specify a smart rule by name in the Mail script because there will be several with different criteria dependent on the sender of the email and/or text in the subject line.