AppleScript to Send and Receive?

D

Doug

I've recently moved back to Entourage after a long time using
Mail.app, and while I was using Mail, I had a simple script that would
check for new mail and refresh my feeds in NetNewsWire. I assigned
this script to a hotkey using FastScripts and would often use it to do
a last-minute check on everything before leaving my computer. I'm
trying to get this to work with Entourage, but I can't seem to find
the AppleScript command to Send and Receive all mail. Is there one?
Here's the Mail.app portion of the script. All it does is check for
new messages. How do I do this for Entourage?

using terms from application "Mail"
tell application "Mail"
check for new mail
end tell
end using terms from

Thanks. Doug
 
M

Mickey Stevens

Try this:

tell application "Microsoft Entourage"
execute schedule "Send & Receive All"
end tell

Depending on the structure of your script, you may have to use the "using
terms from application" on either side of the script.
 
B

Barry Wainwright [MVP]

There is no need for a script to check mail, you can just use the keyboard
command cmd-K

However, the command you are looking for is 'connect to {pop account 1, imap
account 3, etc...}'

For sending mail use the simple command 'send' to send all currently queued
mail.

Also possible would be to run the 'send & receive all' schedule by script
with:

Execute schedule "send & receive all"
Or
Execute schedule id 1
(which will always be the S&R schedule, whatever language version of
entourage is being used)
 
D

Doug

Try this:

tell application "Microsoft Entourage"
execute schedule "Send & Receive All"
end tell


Mickey, thanks!

Barry, the reason I want to do this is so that I can use a hotkey that
works in any program to initiate a mail check and an RSS check.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top