Importing E-mail and Attachments via AppleScript

Yeah, I figured it out - an attachment was a .eml file, and its MIME structure confused my script.

Threw a try in where it got confused, then I can ignore deleting the troublesome parts from the generated .mbox source, which leaves the imported attachment in place (so that’ll be a duplication for now, unless I find a way to handle such a case [likely with help from others]).

I mean, it’s only been 1 out of about 3,000 e-mails with attachments, but others may have a different ratio if their correspondents are in the habit of attaching .eml files.

Regarding tagging messages, I can set a Processing tag when the item is first being handled in the script, then change that to Processed (and, I guess Not Processed once done, but I’m not sure yet that will be necessary. I guess that could be dictated by a property which triggers those tagging actions on messages for troubleshooting purposes (mine, or others’).

As per my PM to you, my script currently requires you to specify the Group you’re importing to, to specify the Mail mail folder which contains the original messages, and to select the messages to process in DEVONthink.

This need to specify those attributes is definitely a limitation compared to the other scripts which have been posted here which are only acting on DEVONthink-derived data, and I haven’t yet given any thought to ways around it.

I am making progress on firstRun/in-script selection functions handlers to remove the “hard-coding” of some of these attributes.

First posting of script is likely to be within 24 hours, probably after I incorporate the mail folder in Mail selection code I have.

Sean

As a DEVONthink, scripting neophyte, I’m very much enjoying this discussion and learning a lot from it.

I find DT extremely capable and flexible, but the one thing that is severely missing to me is the ability to incorporate email. I’ve read through many of the discussions and tutorials about email online and I understand that Apple change something in the Apple Mail scripting language sometime ago that prevents simple replicating of messages and attachments (which would save space in the Devon think database) but if that remains infeasible, then stratadata’s ideas may prove extremely helpful.

But mostly in this comment I would like to address the DT team: many people, like I, seem to want to include email as well as their attachments into an overall encompassing DT database, and this is one area that DT has not addressed with a simple user solution as they have for so many other things.

My hope, and my suggestion, is that whatever the DT team can do to enable users to configure DT as THAT all encompassing database could open up dramatic use cases for additional users!

1 Like

But mostly in this comment I would like to address the DT team: many people, like I, seem to want to include email as well as their attachments into an overall encompassing DT database, and this is one area that DT has not addressed with a simple user solution as they have for so many other things

Outside of needing to use the Pro or Server edition, there is nothing preventing you from adding emails to your databases. In fact, not only is this widely discussed here but it’s also documented in the built-in Help and manual.

Also, you already can import attachments separately in version 3 and 4, with 4 having some automatic import options.

PS: “all encompassing” is undefined and subjective, so I’m not sure exactly what that means.

1 Like

Bluefrog, I have indeed experimented with importing in boxes, but was never able to deal effectively with the attachments in an automated way. Hence why I’m still learning.

However, unless I’ve missed something, the DT functions around Apple mail do not allow “replicating“ all of the messages in Apple mail, along with their attachments. Have I indeed missed that?

1 Like
  • Are you running DEVONthink 4?
  • Have you taken time to assess what attachments need to be separated, e.g., from specific email addresses or accounts, etc.? There are options to automatically download all attachments, but that may not be ideal with an uncurated email import.

the DT functions around Apple mail do not allow “replicating“ all of the messages in Apple mail, along with their attachments.

Please clarify the terms here. Replicating means a very specific thing in DEVONthink and I’m unsure if you are thinking the emails will remain in Apple Mail and DEVONthink has some kind of a link to them instead of importing them.

1 Like

On Jul 28, 2025 at 2:35:49 PM, Jim Neumann via DEVONtechnologies Community <community@devontechnologies.com> wrote:

45x45 BLUEFROG
July 28

  • Are you running DEVONthink 4?

Yes, sorry. DT 4 desktop version

  • Have you taken time to assess what attachments need to be separated, e.g., from specific email addresses or accounts, etc.? There are options to automatically download all attachments, but that may not be ideal with an uncurated email import.

My initial intent is to inport all attachments associated with the email message and associate each with their parent message. Once I get that working I may investigate ignoring some attachments based on TBD criteria.

the DT functions around Apple mail do not allow “replicating“ all of the messages in Apple mail, along with their attachments.

I am aware that Apple has made this difficult, but I’m attempting to express the importance of coming up with a supported workaround for this critical function of attempting to build one comprehensive database of daily activities. I do think that something like this is an inevitable result of the growing capabilities of AI, and it would be spectacular if DT could support this functionality.

Please clarify the terms here. Replicating means a very specific thing in DEVONthink and I’m unsure if you are thinking the emails will remain in Apple Mail and DEVONthink has some kind of a link to them instead of importing them.

I’m attempting to use the term “replicate” as DT uses it - a link to another document without copying it into DT’s database. The EVENTUAL goal is to have ONE system-wide place where I can research any information I’ve imported from email, web browsing, messages, etc. (I shudder to think this sounds a bit like Microsoft’s attempt, but with things in DT it is I who will have control over what data leaves my system, just as I currently use a local Olama AI for DT.)

1 Like

I mean this question with respect, and as one who is himself suffering I think from some kind of “digital hoarder” mental issue: why do you need 31 years of emails? I mean, I’ve kept email archives myself, and I can certainly see how having then in DEVONthink would be such an obvious win. But seriously, is 31 years of emails genuinely helpful? Not mocking at all. Just genuinely curious and fighting my own battles here.

3 Likes

It does sound extreme, doesn’t it. And it many case it would be. But I’m experimenting with 'what happens if you have ALL your data in one repository and explore it with AI". So the historical stuff, even if rarely used by today’s standards, might yield some interesting insights if taken as a whole. That’s why I’m pursuing this capability.

1 Like

Ah, funny you should say that as I’ve been fiddling around feeding every electronic book I own into an AI RAG system to see what I can do with it. Your answer actually makes a lot of sense. Thanks!

1 Like

I’m not sure how you feel AI is related to “building one comprehensive database of daily activities.

I’m attempting to use the term “replicate” as DT uses it - a link to another document without copying it into DT’s database. The EVENTUAL goal is to have ONE system-wide place where I can research any information I’ve imported from email, web browsing, messages, etc.

Read the Getting Started > Building Your Database section of the Help. There are comfortable limits to database size relative to the hardware and machine resources available.

At a minimum – and not knowing the actual volume of emails per period – I would be considering a minimum of three email databases, one per decade, e.g., 2000-2009, 2010-2019, etc. The volume of emails may dictate an even more granular setup. Even without AI, you would likely not have the resources to have all the databases open simultaneously unless you are running a very powerful Mac with triple the consumer-level RAM (48+).

Also, see my response below.

But I’m experimenting with 'what happens if you have ALL your data in one repository and explore it with AI". So the historical stuff, even if rarely used by today’s standards, might yield some interesting insights if taken as a whole. That’s why I’m pursuing this capability.

Well, let me stop you there as what you’re imagining isn’t feasible. If you read the Getting Started > AI Explained > What Can’t Be Done With AI section, this is made clear…

This would be further underscored by your use of local AI like Ollama. Unless you’re running a Mac Studio with 512GB RAM, you’re going to quickly run into hardware limitations trying to process that volume of information outside DEVONthink. Even with that hardware, you are talking about a massive task unlikely to be accomplished on home hardware.

2 Likes

That is a pretty straightforward scripting step, and the first stage of my new script (posting shortly after some commenting on recently-added improvements).

However, the URL/link I’m using is DEVONthink-internal, not a link back to the original message in Mail.

If it were possible to get that link via AppleScript, it would be a simple matter to link attachments in DEVONthink back to their original containing message, but I’m not (yet) seeing any way to get those Mail-internal links.

This may be difficult to implement in any meaningful way, except, perhaps, by minimising the storage in DEVONthink by removing all attachments from imported e-mail messages.

You could achieve that with my script and a re-import of the stripped e-mails, but it would still have the body of the e-mails imported, including those which never had attachments.

It sounds like you’re trying to avoid that storage use within DEVONthink and retain the benefits of using a mail client rather than DEVONthink to work with e-mails.

I couldn’t even begin to try and suggest to the developers a way to index e-mails which are remaining in Mail the way files are indexed and remain in the Finder.

Sean

I guess I don’t need them.

My mix of e-mails encompasses the several non-profit organisations I have volunteered for or been on boards of, personal messages, 21 years of technical and business-related material from when I had my Apple consultancy, messages related to the writing I did for MacNews/MacUser/Macworld (and ther pubs) here in Australia, messages from now absent friends, etc.

Each year, as I archive the prior year, I get rid of any dross I haven’t removed during the year such as 2FA codes, OOO messages, etc, but yes, it still a pretty extreme thing to just keep it all.

To say I get occasional benefit by being is an understatement. To say it costs me nothing is a simple corollary of how cheap storage is these days.

You won’t be surprised to hear I also keep wooden offcuts from my (very basic) woodworking projects “just in case” I ever need just such a piece. It does happen that I use these offcuts at times, but due to space constraints (physical space is not as cheap as digital space) I have had to curb that “keep everything just in case” mentality.

I am certainly generally more successful at “deleting” physical stuff I’ve hoarded than digital (e.g. I still have all the messages in my phones since I first got an iPhone when they were released in Australia [minus SPAM, 2FA codes, etc.], but I haven’t kept all those iPhones or their boxes).

Sean

I currently have a single database for e-mails from 1994 onwards, decade groups with individual year groups within those, and (now) an attachments group in each year group).

I have a 3.4 GHz Quad-Core Intel Core i5 27" Late 2013 iMac with 32GB RAM running Sequoia under OpenCore Legacy Patcher. While it has a NVIDIA GeForce GTX 775M 2 GB GPU, that doesn’t seem to be used by the OS much these days.

I’m not noticing any particular slowness in DEVONthink (of course things would be faster on better hardware), and that database has just passed 160,000 items as I extract the attachments:


To say I’m impressed with DEVONthink’s performance is an understatement.

I’ve not yet decided to combine the e-mail database with my main database (and perhaps with my file archive one), but I’m not necessarily precluding that in the future, either.

I’m certainly going to be keeping an eye on my experience with this, and try and remain sensible, but we’ll see :slight_smile:

Sean

I guess now I’m curious enough to ask a follow up question. To wit, is there any easy way to import bulk emails directly from Outlook PST files? I started keeping my emails in DT when I first started using the program five or ten years ago, but then Microsoft kept breaking the integration, so I kind of gave up at one point. But listening to the various purposes expressed in this thread, it makes me wish I’d been more diligent at the problem. I do have PST files of archives, but I don’t know of any easy way to get that into DT unless it has direct import support.

I think you’d have to export them as a .mbox file, to then import into DEVONthink.

Well, here it is, in all it glorious unoptimised “beauty” :slight_smile:

I apologise in advance if looking at this drives (or makes) you mad.

I haven’t even tried to consider optimisation, so if you see improvements, please let me know.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

-- This is primarily for the HMS translation and UTC offset – using do shell script with date will obviate the need for this framework, I believe
use framework "Foundation"

-- Define size of inline attachments above which we keep the imported attachments and delete the MIME part
set minPictureSize to 50000 -- put in scope to round up to next divisible by 4 numnber if changed

-- Figure out the base64-encoded size of minPictureSize – we'll add line breaks later (technically, line lengths won't always be 76)
set minbase64size to (round (minPictureSize / 3) rounding up) * 4

-- Let's set up our MIME part delimiting stuff
set partDelimiter to "\n--"

set currentRecordNum to 0

--with timeout of 600 seconds

-- select the Mail mailfolder the source messages are in
-- Grab the list of mailboxes
tell application "Mail"
	set {mailAccountIDs, mailAccountNames, mailAccountsMailboxes} to accounts's {id, name, mailboxes}
	set localMailboxes to its mailboxes
end tell

-- Create lists of them
set mailboxList to {}
set chooseMailboxList to {}
repeat with currentAccountNum from 1 to (count mailAccountIDs)
	set suffix to " of account " & mailAccountNames's item currentAccountNum
	repeat with currentMailAccountsMailbox in my mailAccountsMailboxes's item currentAccountNum
		set my mailboxList's end to {(currentMailAccountsMailbox as record)'s «class seld» & suffix, (currentMailAccountsMailbox as record)'s «class seld», mailAccountIDs's item currentAccountNum}
		set my chooseMailboxList's end to (currentMailAccountsMailbox as record)'s «class seld» & suffix
	end repeat
end repeat
repeat with localMailbox in my localMailboxes
	set my mailboxList's end to (localMailbox as record)'s «class seld»
end repeat
set selectedMailbox to choose from list chooseMailboxList with prompt "Select mail folder:" default items (first item of chooseMailboxList)
repeat with currentMailboxDetails in mailboxList
	if currentMailboxDetails contains selectedMailbox then
		set SelectedMailboxName to item 2 of currentMailboxDetails
		set SelectedMailboxAccountID to item 3 of currentMailboxDetails
	end if
end repeat
-- display dialog SelectedMailboxName & " – " & SelectedMailboxAccountID
-- /select the Mail mailfolder the source messages are in
set countAdj to 0 -- not sure I'm using this. I think it was meant to exclude non-e-mail records in the chosen group

-- Where are we saving the .mbox file? This could be a dialog selection
--set mboxFolder to "~/Desktop"

-- What are we naming the .mbox file?
-- get last component of mailbox path (mailbox name) and use it in the import .mbox file's name
set AppleScript's text item delimiters to "/"
set mboxFileName to (last text item of SelectedMailboxName as string) & " Import.mbox"
set AppleScript's text item delimiters to ""

-- Full path to .mbox file?
--set mboxFilePath to mboxFolder & "/" & mboxFileName

-- Let's get the file reference
--set mboxFile to mboxFilePath as string
set mboxFile to (((path to desktop folder) as string) & mboxFileName)

--remove existing .mbox import file, if any
try
	tell application "Finder" to delete file mboxFile
end try


tell application "DEVONthink"
	activate
	
	-- Let's set the group for messages
	set emailsGroup to display group selector "Select a group with e-mails:" buttons {"Cancel", "OK"}
	
	-- Let's set the group for attachments
	set attachmentsGroup to display group selector "Select a group for attachments:" buttons {"Cancel", "OK"}
	
	-- Set up some variables for the progress indicator
	set countRecords to (count children of emailsGroup)
	set startTime to current date
	
	set elapsedTimeHMS to ""
	
	-- Let's go!
	try
		-- Where are we up to?
		show progress indicator "Separating attachments…" steps (countRecords + countAdj)
		
		-- Go through the group with the e-mails
		repeat with currentItem in (children of emailsGroup)
			repeat 1 times -- can I get rid of this?
				--Which record are we at?
				set currentRecordNum to currentRecordNum + 1
				
				-- Some more progress indicator stuff once we've passsed one record processed
				if currentRecordNum > 1 then
					set elapsedTime to round ((current date) - startTime)
					set perItemTime to round (elapsedTime / (currentRecordNum - 1))
					set totalEstTime to elapsedTime + perItemTime * (countRecords - currentRecordNum)
					set elapsedTimeHMS to my secondsToHMS(elapsedTime)
					--set elapsedTimeHMS to secondsToHMS from elapsedTime
					set totalEstTimeHMS to my secondsToHMS(totalEstTime)
					set timeProgressString to " (" & elapsedTimeHMS & "/" & totalEstTimeHMS & ")"
				else -- or for first record
					set timeProgressString to ""
				end if
				-- And show the calculated progress numberds and current record name
				step progress indicator (currentRecordNum as string) & "/" & (countRecords as string) & timeProgressString & ": " & name of currentItem
				
				-- Only process records with attachments
				if attachment count of currentItem > 0 then
					
					-- We need the UUID because it's basically the Message-ID we'll search for later (we'll strip the < and > then)
					set recordUUID to the uuid of currentItem
					-- set recordID to the id of currentItem
					
					-- new message, nothing deleted yet
					set attachmentsDeleted to false
					
					-- We need the DEVONthink item link because we'll put that into the URL field of the imported attachments we're keeping in DEVONthink
					set recordRefURL to the reference URL of currentItem
					
					-- Now we import the attachments and hold onto a reference to them all
					set importedAttachments to import attachments of record currentItem to attachmentsGroup
					
					-- Looping through those attachments, we'll delete pictures smaller than 50,000 bytes, and set the URL to the e-mail for everything else
					repeat with currentAttachment in importedAttachments
						if (the record type of currentAttachment) as string = "picture" and (the size of currentAttachment) < minPictureSize then
							delete record currentAttachment
						else
							set the URL of currentAttachment to recordRefURL
							
							-- we also give the tag for this item on whether to do anything with the source data )any time we keep an attachment in DEVONthink we wantt o delete it from the mail source and save that modified source in the mbox file
							set attachmentsDeleted to true
						end if
					end repeat
					
					-- Once attachments processed, if any were kept, let's work on the e-mail for inclusion in the .mbox file
					if attachmentsDeleted then
						tell application "Mail"
							-- activate
							
							-- Which mail folder are we to look for the message in?
							set mailFolder to mailbox SelectedMailboxName of account id SelectedMailboxAccountID
							
							-- Let's prepare the Message-ID and find any matching message/s in the appropriate folder
							set matchingMessageID to (rich text 2 thru -2 of recordUUID)
							set matchingMessages to (messages whose message id is matchingMessageID) of mailFolder
							
							-- OK, we'll repeat the following for each found message for now
							-- ** I can probably just use the first matching message (as second messages won't be imported into DEVONthink anyway
							-- ** That would mean the line above would change, and we can remove the loop folloiwng immediately here
							repeat with currentMessage in (get matchingMessages)
								-- Clear the .mbox placeholder variable for a new message
								set messageMboxText to ""
								
								-- Create the first line of the message in .mbox
								set msgFrom to extract address from (sender of currentMessage)
								set dateMsgReceived to the date received of currentMessage
								
								set mboxMsgStart to my mboxFirstLine(msgFrom, dateMsgReceived)
								
								set messageMboxText to messageMboxText & mboxMsgStart
								
								-- Grab the source of the message
								set messageSource to (the source of currentMessage)
								
								-- ** Do I need this again?
								set messageID to the message id of currentMessage
								
								-- ** Grab the headers - I wonder if I can just test the whole message and if that will be quicker than grabbing headers and then testing?
								set messageHeaders to all headers of currentMessage
								
								-- We test to see if the message has multiple MIME parts - we ignore otherwise
								-- If we are only running this script against e-mails in DEVONthink which are showing attachments, this test is likely superfluous
								if messageHeaders contains "Content-Type: multipart/" then
									-- We do this so we can split the message by MIME parts (each text item is a MIME part)
									set AppleScript's text item delimiters to partDelimiter
									set messageParts to every text item of messageSource
									set countMessageParts to count of messageParts
									
									-- Grab everything up to the actual first MIME part
									set messagePreamble to item 1 of messageParts
									
									-- Grab the last MIME part (which will be a boundary ending spec)
									set messagePostamble to item countMessageParts of messageParts
									
									-- Start the .mbox data with the Preamble
									set messageMboxText to messageMboxText & messagePreamble & partDelimiter
									
									-- Loop through everything except the first and last parts
									repeat with partNumber from 2 to (countMessageParts - 1)
										-- Now we inspect and act on each part as necessary
										set currentPart to item partNumber of messageParts
										
										-- Attachments will always have the encoded part after two newlines, so now we split the currentPart using two newlines
										-- ** This may be able to be swapped around with the Content-Type tests following
										set AppleScript's text item delimiters to "\n\n"
										
										-- Is there more than one section to this MIME part separated by two newlines?
										-- Let's do something if there is
										if (count text items of currentPart) > 1 then
											-- Let's test for the inline Content-Types we want to consider actions for
											-- if ((text item 1 of currentPart contains "Content-Type: image/") or (text item 1 of currentPart contains "Content-Type: application/")) ¬
											-- and (text item 1 of currentPart contains "Content-Disposition: inline") then
											
											-- Firstly inline images
											if ((text item 1 of currentPart contains "Content-Type: image/")) and (text item 1 of currentPart contains "Content-Disposition: inline") then
												-- grab the base64 data
												
												-- This is for when inline or image parts don't have a second interpretable part 2025-07-28
												try
													set encodedData to text item 2 of currentPart
													
													-- Check the line length of the base64 encoded data
													set b64LineLength to count characters of (first paragraph of encodedData)
													
													-- Add the base minimum base64 encoded size to the appropriate number of newline characters
													set minMIMEEncodedSize to minbase64size + (round (minbase64size / b64LineLength))
													
													-- Grab the size of the attachment's encoded data
													set currentPartSize to count characters of encodedData
													
													-- Is the encoded data smaller than our minimum size?
													if currentPartSize < minMIMEEncodedSize then
														-- If so, write that small encoded data into our .mbox variable
														set messageMboxText to messageMboxText & currentPart & partDelimiter
													end if
												on error
													set messageMboxText to messageMboxText & currentPart & partDelimiter
												end try
												-- For non-inline images, or application/ Content-Types
											else if ((text item 1 of currentPart contains "Content-Type: image/") or (text item 1 of currentPart contains "Content-Type: application/")) then
												-- Do nothing - i.e. don't add them to the .mbox variable
												
												-- And for anything that doesn't have two newlines while also not matching the above Content-Type and size tests and exclusions
												-- just write the part to .mbox variable (usually text/plain and text/html, for example)
											else
												set messageMboxText to messageMboxText & currentPart & partDelimiter
											end if
											
											-- And for "single" item MIME parts (i.e. no double newlines), just write the part to .mbox variable
										else
											set messageMboxText to messageMboxText & currentPart & partDelimiter
										end if
										
										-- Finish loop of message parts
										
										set AppleScript's text item delimiters to ""
									end repeat
									
									-- We've inspected all the parts and taken appropriate action
									-- let's write the last MIME part (last boundary closure)
									set messageMboxText to messageMboxText & messagePostamble
									
									
									-- Finish with multipart Mail message
								end if
								
								-- End loop of matching Mail records by UUID
							end repeat
							
							-- Exit Mail tell loop
						end tell
						
						-- ** Set up write to .mbox file here
						try
							set openMboxFile to open for access file mboxFile with write permission
							write (messageMboxText & "\n\n") to openMboxFile starting at eof
							close access openMboxFile
						on error
							try
								close access openMboxFile
							end try
						end try
						
						-- Finish with messages where attachments have been deleted
					end if
					
				end if
				
			end repeat
			-- End loop of DEVONthink selected items
		end repeat
		
		hide progress indicator
		
		--end try
		
	on error error_message number error_number
		hide progress indicator
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
	end try
	
	-- Exit DEVONthink tell loop
end tell

--end timeout

beep
beep
beep
beep
-- And we're done!

on mboxFirstLine(fromAddress, dateReceived)
	set tz to current application's NSTimeZone's localTimeZone()
	
	set theOffset to (tz's secondsFromGMTForDate:dateReceived)
	set dateReceivedGMT to dateReceived - theOffset
	set dateReceivedWeekday to characters 1 thru 3 of ((the weekday of dateReceivedGMT) as string) as string
	set dateReceivedMonth to characters 1 thru 3 of ((the month of dateReceivedGMT) as string) as string
	set dateReceivedTime to characters -1 thru -8 of (dateReceivedGMT as string) as string
	set dateReceivedYear to year of dateReceivedGMT
	set dateReceivedDay to characters -1 thru -2 of ("0" & (day of dateReceivedGMT)) as string
	set mboxStartLine to "From " & fromAddress & " " & dateReceivedWeekday & " " & dateReceivedMonth & " " & dateReceivedDay & " " & dateReceivedTime & " " & dateReceivedYear & "\n"
	return mboxStartLine
end mboxFirstLine

on secondsToHMS(theSecs)
	set h to theSecs div 3600
	set s to theSecs - h * 3600
	set m to s div 60
	set s to s - m * 60
	set HMSSTring to (characters -2 thru -1 of (h + 100 as string) & ":" & characters -2 thru -1 of (m + 100 as string) & ":" & characters -2 thru -1 of (s + 100 as string)) as string
	return HMSSTring
end secondsToHMS

on firstRun()
end firstRun

It’s happily processed the last few mailboxes without error, but it’ll be interesting to see how others get on.

It’s currently non-destructive – the e-mails are left in original state in DEVONthink and in Mail.

You can just delete the attachments group/s and the .mbox file/s generated and everything will be back to where it was when you started.

Once it’s more tidied up, I will delete the e-mail in DEVONthink after the .mbox is updated.

I’ll likely leave the unaltered e-mail in Mail (it still has read/replied/forwarded/redirected status which I am not importing) – I’ll likely archive it from there some other way.

Let me know what you think!

Sean

As I mentioned, I have no clue about the volume of emails people may have but those numbers look comfortable enough, especially given you have more RAM than many people. :slight_smile:

Getting links to Apple mail messages
I use a variation of the script linked to in this article to get a link to an Apple email message. The link will work in MacOS and iOS.
The true genius of DEVONthink is that if you do eventually archive all your mail into DT, it’s a simple modification of the link to change it to refer to that same message in DT.
I am frequently forced to use corporate email addresses for short term gigs. At the end of a contract I archive all the emails into a DT database. I can do a quick search and replace of the url prefix to switch the links in my task manager/note app to link to the DT instance of the message instead of the Mail instance.

1 Like

No, there is no support for .PST files nor .OLM files. More Microsoft nonsense on the Mac.

1 Like

Just quick side notes:

The recommended syntax is tell application id "DNtp".

beep
beep
beep
beep

can be replaced with beep 4.

1 Like