I have an application (FMPro) that makes mail-messages in plain-text format and puts it in the Outbox-folder from Entourage.
Now I want to insert a specific signature in every mailmessage.
So the script has to do the following for every message in the Outbox folder:
set the email to HTML
insert the signature
set the category
move it to a specific mailbox after sending.
sent it later.
Who can help me an d give me the instructions to do this??
Thanks in advange!!
Here’s the basic form to talk to Entourage. If you open up the Entourage scripting dictionary, you should be able to figure out how to insert a signature and the other parts that you want:
set PathToDesktop to path to the desktop as text
tell application "Microsoft Entourage"
activate
set email_content to "This is a test."
set ToList to {"address1@gmail.com", "address2@hotmail.com"}
set new_message to make new draft window with properties {subject:"Testing Script", content:email_content as Unicode text, attachment:(PathToDesktop & "File.txt"), recipient:ToList}
send new_message
end tell
Model: iMac Intel 10.5.8
Browser: Firefox 3.0.2
Operating System: Mac OS X (10.5)
set fileThese to messages in folder "Outbox"
repeat with fileThis in fileThese
open fileThis
set subjectText to the subject of fileThis as string
set contentText to content of fileThis as string
set theRecipients to every recipient of fileThis
--set theRecipients to the address of recipient 1 of fileThis
try
activate
set theMsg to make new draft window with properties {account:POP account "Home", subject:subjectText, recipient:theRecipients, content:contentText as Unicode text}
send theMsg
end try
end repeat
end tell
When I try this it’s trying to send the message, but there is no recipient filled in. So it can’t be sent.
When I switch the statement about theRecipients (switch the – in both lines) it works fine, but only with the first name in the To-field.
Can somebody help me to solve this tiny problem?? I want all the names in the To-field.