Thanks a lot, that worked. I want to do this because I'm having problems with the Queue. In the Queue there's always anywhere from 12-14 emails. If I restart the SMTP service, the emails get sent away to their destinations, and new email comes in. Now if I just leave the emails there and never restart the smtp service, then a few of the emails in there will just sit for a day or two, then be sent of randomly. Pretty much everythings random in the Queue, except when i restart it, then it seems to work well for a few mins.. So I figure (for a short time goal of course) I will make a script that restarts the smtp servivce every 5 minutes and everything will be fine.
Is there a line i can add to the beginning of the script that minimizes it? It gets annoying when it pops up every 5 minutes.