DT3 and email: best integrated email client?

Having just upgraded to Catalina and having had yet another Mail.app problem (or three, including loss of local storage folders) I’m interested in using a new email client. Not to mention that Mail.app doesn’t allow Spotlight indexing access for other applications, so that now you can’t use third party applications to search email messages.

So I’m looking for a very reliable email client. Something that allows Spotlight searching and preferably quicklook. I’ve got Outlook, but it’s tough to use with DT. And I’ve used Thunderbird, although no QL for eml files (at least with my current set up) and it looks like integrating with DT will be a pain. Spark is nice, but despite lots of requests there seems no DT integration with that either.

What I need is to be able to move/copy/export in bulk from an email client and into DT. I need those files accessible to outside programs. And the ability to generate bulk PDFs from the email, like Email Archiver does for Mail.app.

Thanks!

1 Like

I use Airmail and it’s not great at moving into DT, but it’s workable. Although, I don’t often archive emails into DT.

If I use the Send To… command from within Airmail, it saves the email as plain text, which generally isn’t a good option:

But if I drag the email to the Sorter in the Menu bar, it gets saved as an “email message” including any attachments:

Highlighting and dragging multiple emails works the same way, each email getting its own file and attachments preserved.

I have been going back and forth between Airmail and Mail with Catalina.

The big advantage of Mail is the available Script that creates a new group for a message with the files moved into Devonthink as documents.

The disadvantage of Mail is that it seems to have bugs in Catalina, including frequently just freezing.

Airmail seems more reliable overall in Catalina. . The disadvantage is that when you move an email, as @RobH shows the attachments are not truly imported into Devonthink; you have to download them and then drag them back into Devonthink if you want to manipulate them like other documents in Devonthink.

I think when I drag the email(s) to the sorter the attachments are included, but how to know for sure?

For the emails pulled into DT via the sorter, they look like the attachments are there. I pulled one of these into BBEdit and it has the MIME content in it:

Content-Type: application/pdf; name=INV04856773_921854_10032019.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=INV04856773_921854_10032019.pdf

But, again, how can we know that it’s in DT and not pulling from elsewhere?

They are there but only as attachments of the email. They have not been pulled in as regular DT3 documents. The Mac Mail script does that; simply dragging the email over does not do that. Dragging it over creates one file - an .eml file. The Mac Mail script creates a Group and then creates individual documents.

I think that Mailmate is probably the best mail client for Mac OS – as long as you only use IMAP. It can easily export to DT3 via built-in plugin (I use it for this). It has incredible in-app search (the best I’ve seen), Spotlight searching, and QuickLook. Not sure about bulk conversion to PDF, though.

Some are put off by the somewhat old-fashioned-looking UI, but it’s the labor of love of a lone Danish developer and it works really well.

A second vote for Mailmate – excellent mail client, been using it for yonks now.

@thersites @mrkwr Is it possible to export the PDF attachment from an email to DT3 With a shortcut (or automatically, even better), rather than the full email? I’ve downloaded MM and I’m trying to get a handle on all it can do. I’m loving it so far.

You can set the default folder for downloading attachments in MailMate to a folder indexed by DT or to a folder with a folder action assigned to it that will import the PDFs into DT

You can script Airmail to:

  • import all attachments of selected email to DT with a back link to this email in Airmail
  • import just the body in RTF format with the back link
  • import RTF body and a group with all attachments named after email title
  • batch processing

Airmail considerations:

  • (+) IMAP and Exchange
  • (+) permanent backlink to email, notwithstanding where to you will move this email later. Usable in AS and in other apps
  • (+) nice and capable iOS version
  • (–) very bad AppleScript support
1 Like

Is there any sites that go into details about that scripting you mentioned? Great tip btw, it got me back to thinking of Airmail.

On another note. I am looking for the best mail client for both
Devonthink
Tinderbox
2Do and
Scrivener.

Any hopes of merging them all?

Maybe, I don’t know of such sites. If you can say what exactly you want, I may find one of the scripts close to it, like this one e.g.:

use AppleScript version "2.7"
use scripting additions
on performSmartRule(theRecords)
	tell application "Airmail 3" to set theAirmailURL to the selectedMessageUrl
	tell application id "DNtp"
		if (count of theRecords) > 0 then
			set tmpPath to "/Users/ilya/Documents/00_Temp" -- Setup your temp folder here
			repeat with theRecord in theRecords
				if type of theRecord is unknown and path of theRecord ends with ".eml" then
					set theParents to parents of theRecord
					set {theName, theCreated, theURL} to {name, creation date, URL} of theRecord
					set theRTF to convert record theRecord to rich
					try
						if type of theRTF is in {rtfd, rtf} then
							set thePath to path of theRTF
							set theGroup to parent 1 of theRecord
							
							--Importing the Message
							tell application "Finder"
								set filelist to every file in ((POSIX file thePath) as alias)
								repeat with theFile in filelist
									set theFileName to name of theFile
									if theFileName is "txt.rtf" then
										set theAttachment to POSIX path of (theFile as string)
										set theAttachment to duplicate ((POSIX file theAttachment) as alias) to (tmpPath as POSIX file) with replacing
										set theAttachment to POSIX path of (theAttachment as string)
										tell application id "DNtp"
											set newRTF to import theAttachment to theGroup
											set name of newRTF to theName
											set creation date of newRTF to theCreated
											set URL of newRTF to theURL
											set theFrom to attribute run 3 of rich text of newRTF
											add custom meta data theAirmailURL for "airmailid" to newRTF
											add custom meta data theFrom for "from" to newRTF
											delay 3
											delete record theRTF
											delete record theRecord
										end tell
										delete theAttachment as POSIX file
									end if
								end repeat
								
								--Importing Attachments
								tell application "Airmail 3" to set theAtts to filename of mail attachments of selected message
								repeat with theAtt in the theAtts
									set theAttFile to (theAtt as POSIX file) as alias
									tell application id "DNtp"
										set newAtt to import theAttFile to theGroup
										set URL of newAtt to theURL
										add custom meta data theAirmailURL for "airmailid" to newAtt
										add custom meta data theFrom for "from" to newAtt
										if filename of the newAtt ends with ".pdf" then perform smart rule name "OCR Quality Check" record newAtt
									end tell
									delay 1
								end repeat
							end tell
						end if
					on error msg
						display dialog msg
					end try
					
					-- Replicating (if EML file had replicants)
					repeat with i from 2 to (count of theParents)
						replicate record newRTF to (item i of theParents)
					end repeat
					
				end if
			end repeat
		end if
	end tell
end performSmartRule

Make it a Smart Rule on Import, and drag messages into DT. Script will:

  • Create RTF from the body of the Message (with “mail to” and Message Links)
  • Import all attachments (also with “mail to” and “Message Links” each)

With “mail to” links you will be able to answer to the sender from any of these files
With Massage links (written to custom metadata) you can switch from this document in DT to appropriate message in Airmail and back with a hotkey, link other docs you want to this email and later see all DT docs connected with it and so on. This connection will stay working until you delete message in Airmail and purge its trash, i.e. you may move this message around the Airmail folders as much as you want.

Known issues:

  • From the version 4.0 Airmail stopped importing EML format to DT while dragging. Instead it creates a plain text in DT now (what a “clever” idiot did this, I don’t know). To bypass this issue you may switch to legacy support in General Preferences pane

PS
I, personally don’t like Airmail much, but unfortunately there are no any better alternative to the pros, I named earlier.

Apple Mail is still the best of breed when it comes to inter-application communication.

1 Like

Mailmate works the best for DT integration. Seems flawless for both text and attachments.

Welcome @wcarozza

That is the first such report I’ve ever seen. Can you clarify what you’re doing in MailMate?

Pretty easy. Just click DTP in MM Bundles (found in Prefs) and then use the keystroke cntl-shift-A-1 and the full email with attachments lands in the DT Global Inbox. Looks good on DTTG too.

Bill

Thanks for the follow-up. Cheers!

You too! I’m a brand new convert to DT from a decade of using Evernote. Feel pretty good about being able to sync this weekend with DTTG. DT is working well even with 40K notes.

Bill

1 Like

Glad to have you aboard.

What kind of sync are you going to do?