Hello all,
Strange behaviour - and just want to check if this is being seen by others, or is something I need to start a support ticket on.
One of my DBs sees two Mailboxes archived, both from Mail.app and Outlook. When any of these emails are viewed inside DTTG2 (since they are synced from DTPO to DTTG2), they display perfectly.
However, individual email messages that I import from Outlook into DTTG2, using the script below (found somewhere on this forum - created by Christian Grunenberg all the way back in 2010) that is triggered via Fastscripts, does NOT display properly in DTTG2, with HTML code seemingly being displayed…
Importantly, the same email DOES display correctly when being viewed in DTPO.
A ‘simple’ workaround involves printing each individual email message from within Outlook, and saving it as a PDF in DTPO - but then you lose the ability to link back to the message from DTPO.
I realise there have been several posts of late explaining how relying on a 6-year old script is most likely the issue - but figured I’d drop this here regardless. The script is incredibly useful, and it would be wonderful if something could be done to allow the usage to continue - being able to trigger the Fastscript to save messages as emails inside DTPO, that are also properly viewable inside DTTG2.
Any suggestions would be greatly appreciated!
property pNoSubjectString : "(no subject)"
tell application "Microsoft Outlook"
try
set theSelection to the selected objects
if theSelection is {} then error "One or more messages must be selected."
tell application id "DNtp"
if not (exists current database) then error "No database is in use."
set theGroup to preferred import destination
end tell
repeat with theMessage in theSelection
try
set theSubject to subject of theMessage
set theSender to sender of theMessage
set theSender to (address of theSender) as string
set theSource to source of theMessage
set theDateReceived to time received of theMessage
set theDateSent to time sent of theMessage
if theSubject is equal to "" then set theSubject to pNoSubjectString
set theCategories to {}
set theList to (category of theMessage)
repeat with theCategory in theList
set theCategories to theCategories & (name of theCategory)
end repeat
set isFlagged to true
if todo flag of theMessage is (not flagged) then set isFlagged to false
set isUnread to is read of theMessage
tell application id "DNtp"
set theRecord to create record with {name:theSubject & ".eml", type:unknown, creation date:theDateSent, modification date:theDateReceived, URL:theSender, source:(theSource as string)} in theGroup
if theCategories is not {} then
set theTags to tags of theRecord
set theTags to theTags & theCategories
set tags of theRecord to theTags
end if
if isFlagged then set state of theRecord to true
if isUnread then set unread of theRecord to true
end tell
end try
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "Outlook" message error_message as warning
end try
end tell