scripting apple's mail app

Hi I was wondering if there already a script that checks if there’s new email by checking the Mail app. if not, how do i go about checking if there’s new mail.

: Hi I was wondering if there already a script that checks if
: there’s new email by checking the Mail app. if not, how do i
: go about checking if there’s new mail.
If I understand your question correctly, it was asked on one of
Apple’s mailing lists recently. Here’s the answer given by an
Apple employee who works on the development team:
“You can set ‘fetch frequency’ and ‘fetches automatically’, but
there is currently no command to tell Mail to fetch manually on
demand.”
Later,
Rob J

is is possible to get applescript to output how many emails is currently in a mailbox

: Hi I was wondering if there already a script that checks if
: there’s new email by checking the Mail app. if not, how do i
: go about checking if there’s new mail.
Is there any examples online anywhere of how to post and recieve mail through the mail app.