I think Microsoft Windows is close enough, the only other place would be Software. I think we can leave it here for now, unless another moderator thinks it belongs elsewhere.
I dont think a script as you are requesting exists, since there isnt anything that could be interacted with in Command Prompt that would actually change that would show that there is a new email.
Thats the problem with all these graphical user interface programs these days...