PipCop,
Attached is a simple EA that checks the current connection to the server. If the server is down it tries to email you. You'll get another email when the server is back up. MT4 spawns off the sending of emails so I can't check if it worked OK, hence you'll get two mails when anything goes wrong, just to be sure.
To use, just attached this to a new chart. The CheckDelay parameter is the poll-time used to check, defaults to 30 seconds. It uses the mail settings defined in MT4's options, so make sure that these are set correctly.
I'm assuming that account and server info is enough to identify the EA, but there is a parameter where you can put in a custom message.
It works by looping in the init() method of the EA. It seems to work OK, but I don't really know what the implications of this are, as it never processes any ticks. You should try it on a test server and leave it running for a few days. Better still, leave it running with a disconnected network too, just to see what happens
If anyone wants the source, just PM me.
Enjoy
=====
Emails show:
From: "Expert Advisor" <1ka@softyspammer.com>
To: "1ka" <1ka@softwyer.com>
Subject: Problem with server or network - Recovered?
Date: Fri, 3 Apr 2009 11:59:56 +0100
On this server: AlpariUK-Demo, for Account Name: 1ka, Account Number: 6454333993
This is a place holder for a custom message