Email into DT with tags

Hi, Newbie once more

I’m an academic licking his chops at getting up and running on DT, but one who is not immersed in software function. Searching the forum has shown me many threads on my question that are basically incomprehensible to me. If I’m lucky, maybe Bluefrog will step up again for the third time in the past two days to help me out.

I would like to get email from Apple Mail, tagged with MailTag keywords, into DT Pro, with those keywords / tags preserved.

• Dragging an email to the dock or the sorter does not import the email … usually. Once in a while it does, but the tag does not appear on the DT note.
• I tried from Apple Mail using the DT “Add to DT” option on the Message menu, but nothing happens; the notification bar says “0 messages imported”.
• I hit the DT Import icon, and that brought the populated Mail folders into DT. I uncheck “Hide Imported” to see the messages. But I can’t figure out how to get one into a DT inbox.

Thanks once again in advance for your help.

My solution is applescript
I use a modified version of the scripts installed by Devonthink

Can you explain the “tagged with MailTag keywords”?
I wasn’t aware tags being supported by Apple Mail

MailTags is an app which allows you tag e-mails. It is part of MailSuite.
When I archive e-mails the MailTags keywords are imported as tags without any problem.

Have you checked Window > Log in DEVONthink?

This morning I tried again. Opened DT, and this morning’s new emails in the Mail inbox show up in the DT Import view. I sent a new email to myself with a MailTag keyword / tag, went to DT import view, hit “Refresh”, selected it, hit “Import”, and it worked as expected, with the tag intact. I see that with newly received emails I can apply tags and import to DT.

Another good thing is that this morning I was able to drag an email to the sorter, which then showed up in the DT inbox with the tag intact. I have no idea why that worked today and not yesterday.

Problems that remain:

• I apparently imported some 80 emails into DT yesterday, but I cannot find them in any inbox or data base, nor do any appear on search. I see them in the DT import view when I uncheck “Hide imported”. I tried importing several again, and the log showed “4 previously imported”. Luckily these were for testing and have no important data. Where are they?

• When I select an email in Mail, go to the Message pull down, and select “Add to DT 3”, I get the DT notification that “Apple Mail import 0 messages”, which is in fact what happened. This still seems not to work (yet).

• I dragged an email to the dock. What appears in the inbox is a long string beginning “message:%3C0100017c …” etc. It has an active link. The viewer shows the string and an @ icon. I have no idea what this is.

Thanks yet again.

I use a Mail Act-On rule with a script to import messages that I really must have the Mailtags data attached. It translates most of the Mailtags data to DT metadata in addition to keywords and projects.

Dragging and dropping emails to the dock may not work as expected since you’re not dropping the actual file. (Things happen under-the-hood when importing via other methods.)

Post a screen capture of the search you tried unsuccsessfully.

I now find that if I drag an email to the dock, DT creates a link; when I drag an email to the sorter, I get a nice version of the email. These two Inbox files are for the same email. The first one was dragged to the dock, and has a creation time of right now. Five seconds later, I dragged the same email to the sorter and put it in the inbox; its creation date is the day / time of receiving the email.

Thanks

The third method is the one that doesn’t work. Just now I highlighted the SaneBox email, and used the Message menu pulldown of Add to DT 3, and got this:

So three methods of importing an email, three different results.

If you haven’t deleted the previously imported email and emptied the database’s trash, do so and you should be able to import the email via the command in Mail.

As @BLUEFROG said, DT uses mail-id (generated automatically by mail servers and written down in the header of the email) as UUID. So, if your database does contain this email already (in any place) - you won’t be able to import it again until you delete it, and even clean the trash. This is a useful feature, not a bug.

I recommend using AppleScript with Mail. You could tailor one of the standard ones to your exact needs

Thanks, I’ll recheck the three methods by making sure I’m working with emails that haven’t been imported.

I know what AppleScript is, but I’ve never used it and wouldn’t know how to do what you recommend.