Hello to all! I have develop a simple script that crearte a new message with a attachment, code looks like this:
tell application “Microsoft Entourage”
activate
try
make new outgoing message at out box folder ¬
with properties ¬
{to recipients:"my@email.com", content:“Something…”, attachment:“untitled:Desktop Folder:filename.doc”}
end try
end tell
This works fine, but know I am in the need of attaching more than one file, I thought that separating the filepaths with commas would do it… but that is not the case!
I am trying to attach an incoming email to a new outgoing email as an attachment.
How would I go about finding the “path to Incoming message id”
property emailAddress : "myaddress"
property theSubject : ""
tell application "Microsoft Entourage"
set counter to count of messages in folder id 6--Junk e-mail folder
repeat with i from 1 to counter
set fwdMessage to message i in folder id 6
set newMsg to make new draft window with properties ¬
{recipient:{address:emailAddress, recipient type:to recipient}, subject:theSubject, content:theSubject, attachment:fwdMessage}
send newMsg
--if sendAction is "Send later" then send newMsg with sending later -- move to Outbox
end repeat
end tell -- Entourage
and this:
property emailAddress : "myaddress"
property theSubject : ""
tell application "Microsoft Entourage"
set counter to count of messages in folder id 6--Junk e-mail folder
repeat with i from 1 to counter
set fwdMessage to message i in folder id 6
set thePath to path to fwdMessage
set newMsg to make new draft window with properties ¬
{recipient:{address:emailAddress, recipient type:to recipient}, subject:theSubject, content:theSubject, attachment:alias thePath}
send newMsg
--if sendAction is "Send later" then send newMsg with sending later -- move to Outbox
end repeat
end tell -- Entourage