Re: Mac Mail Questions
Re: Mac Mail Questions
- Subject: Re: Mac Mail Questions
- From: Brent Baisley <email@hidden>
- Date: Tue, 17 Feb 2004 14:47:59 -0500
Instead of delay, which will make your script always wait that long,
you can try issuing the command with a "with timeout of 300". Or
whatever timeout number you want. But it seems like mail is returning
control to your script as soon as it successful receives the command,
not when it completes the command.
As a work around, you can create a loop that checks how many messages
are in the "Out" folder. When there are 0, you know the message is
sent. I would put some short delay between checking so that your script
doesn't hog the CPU.
On Feb 17, 2004, at 1:13 PM, Oakley Masten wrote:
Hi to All
How would I go about verifying that a message has been sent? [before
closing the mail program]
I am working on a script to create a "NewMessage" , add an image
attachment, send the NewMessage then close Mac Mail.
It all works just fine - EXCEPT - the "Quit" mail command closes the
mail program before the message has been completely sent. When mail
is reopened the message finishes being sent.
I could put a delay command between the send and quit commands but
that would not account for a slow transfer and might time out before
the file is completely sent. If I set the delay to 300 seconds [for
example] - how do I tell Mac Mail application to run in the background
until timeout?
Best regards
Oakley
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.