How to test that MAIL ended to get mails in an AppleScript

Excuse my rusty english.

I wrote an applescript to connect to dial line (slow connection) and then to get mails.
But I don’t find how I can knon when all the mails are in my computer and I can disconnect securely.

Now, I only add a delay but it is not a nice solution.
And when I try to test with apprentissage I got ´event ascrgdutª but I don’t know how to test with on error or so …
thanks to help a beginner
Best regards
Jacques
:smiley:

Hi Jacques,

Maybe this will be helpful. :slight_smile:

http://bbs.applescript.net/viewtopic.php?t=4221