Friday 24 February 2017

MT4 Email Sending Setup

Another post for future reference purpose.

I have never needed to configure the email setup because manual trading rarely requires it. Most EA does not even bother with the email function, but as we are finalizing TFT Omega I have decided to put in the capability to provide a daily summary of where the account stands by email on a daily basis.

When an EA is configured to use 'SendMail()' the Email option has to be setup in MT4 client. MQL4 Function that requires Email capability:
bool  SendMail(
   string  subject,       // header
   string  some_text      // email text
   );


Configuring Email for MT4 is tricky, email on MT4 have its quirks and shortfall but there are plenty of ways to work around it. I chose the easiest way to do so, by using an email provider that does not enforce SSL for SMTP.

To configure the email setup, follow the steps below.

1. Open a free email account with www.gmx.com
2. Go to 'E-mail Settings' > 'POP3 & IMAP' of the account. Make sure 'Send and receive emails via external program' is checked.

3. Open MT4 Client, go to the following tab by pressing Ctrl+O. Configure the Email tab as follow and click 'Test'. 

4. The test result should show up in the 'Journal' section of the MT4 client. If test is unsuccessful, close the MT4 client and try again.