I want to receive an email from PC everytime it restart. I think about adding EXE file - which send an email - to windows schedule. but I don't know how I write one. any other ideas?
You can probably use task scheduler to do this directly
Its pretty simple.
If you want something fancier and scriptable, you might be able to set up blat - its a pretty minimal, scriptable mail server- which can be set up with the --install argument. You can set up a batch file to be sent by task scheduler, calling blat, with whatever information you want on it.