Hi all,
I want to redirect a copy of my incoming messages to my iPhone but I want to remove all possible attachments prior to do so. Now, I know that Entourage Rule actions can handle that by itself, but I would also like to know which attachments were originally present prior to being removed.
So I enlisted the help of Applescript for the task where I am able to prepend the names of deleted attachments.
Here’s the rub. When I try to redirect the message with Applescript, somehow the message ends up in “Drafts” rahter than “Outbox”. If I simply ask AS to prepend the content of my message with the names of the deleted attachments and ask Entourage Rule Action to redirect, the message gets redirected but WITH attachments included.
I learn that you cannot mix and match Rule Actions and AppleScript if the AppleScript call is not the last one made. The thing is that Rule Action does not wait for the Applescript to complete before running the next action in queue.
So my question is: Does anybody know why my redirected (or forwarded) messages end up in my “Drafts” folder only when the command is sent through AppleScript? And if so, is there a workaround I can use?
Here’s what I have so far:
tell application "Microsoft Entourage"
set theSelection to selection
set theCurrentMessage to item 1 of theSelection
--(*
set AttachmentMessage to "Removed Attachment(s):"
repeat with ThisAttachment in attachments of theCurrentMessage
set AttachmentMessage to AttachmentMessage & return & tab & "¢ " & name of ThisAttachment
end repeat
if AttachmentMessage is not "Removed Attachment(s):" then
set MessageContent to content of theCurrentMessage
set content of theCurrentMessage to AttachmentMessage & return & "------------" & return & MessageContent
delete every attachment of theCurrentMessage
end if
--*)
redirect theCurrentMessage to Redirect_Email without opening window
send
end tell
TIA
Michel