Hi. I’m using DT to backup et sort email files.
I’m trying to run the web server so that other people could access the database.
But the mail file format .eml can’t be displayed in safari (nor firefox)
Is there any tip to do the job?
Or is it possible to import emails in RTFD file format instead of eml automatically?
That’s a solution but there is one (major) problem with it:
The creation/modification date are set to the time when I make the conversion.
I’d preferred that the date stay the same as the original, in order to sort emails by reception date which is no longer possible.
Here’s a script which retains tags, replicants, dates, labels and flags:
-- Convert documents to rich text
-- Created by Christian Grunenberg on Tue Feb 03 2009.
-- Copyright (c) 2009-2011. All rights reserved.
tell application id "com.devon-technologies.thinkpro2"
set theSelection to the selection
if theSelection is not {} then
try
show progress indicator "Converting..." steps (count of theSelection)
repeat with theRecord in theSelection
set theName to (name of theRecord)
step progress indicator theName
try
-- Retains tags & replicants without specifying a destination group
set theConvertedRcord to convert record theRecord to rich
-- Retain dates, label & flag
set creation date of theConvertedRcord to creation date of theRecord
set modification date of theConvertedRcord to modification date of theRecord
set label of theConvertedRcord to label of theRecord
set state of theConvertedRcord to state of theRecord
end try
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end if
end tell
That’s automatically appended by the “convert record” command which is identical to Data > Convert > To Plain/Rich Text. But you could insert these lines to retain the URL & name:
set URL of theConvertedRcord to URL of theRecord
set name of theConvertedRcord to name of theRecord
I’ve just checked this but the URL of the original and the converted email are identical and the converted email contains the sender/receiver. Any hint which information is missing where? E.g. a screenshot might be useful. Thanks!
First Dataset: the eml-File
Second Dataset: the converted file
The Value for “Von” is missing in the second dataset. Also the others values like Absender, Von, Titel, Betreff are missing
I’m using your script:
-- Convert documents to rich text
-- Created by Christian Grunenberg on Tue Feb 03 2009.
-- Copyright (c) 2009-2011. All rights reserved.
tell application id "com.devon-technologies.thinkpro2"
set theSelection to the selection
if theSelection is not {} then
try
show progress indicator "Converting..." steps (count of theSelection)
repeat with theRecord in theSelection
set theName to (name of theRecord)
step progress indicator theName
try
-- Retains tags & replicants without specifying a destination group
set theConvertedRcord to convert record theRecord to rich
-- Retain dates, label & flag
set URL of theConvertedRcord to URL of theRecord
set name of theConvertedRcord to name of theRecord
set creation date of theConvertedRcord to creation date of theRecord
set modification date of theConvertedRcord to modification date of theRecord
set label of theConvertedRcord to label of theRecord
set state of theConvertedRcord to state of theRecord
end try
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end if
end tell