E-mail alerts from Metatrader can be a very useful tool. Indeed our own Mt4 Alert Indicators rely on it (and also phone push notifications) for sending information to users when they are away from their desks. But how does one set it up? This post describes the process
1. From within Metatrader select the Tools | Options menu option which will bring up the Options dialog box.
2. There are many tabs on this, select the Email tab and click the Enable tick box at the top in order to activate the various fields.
3. The way that it works is that you need a “relay” e-mail account which is used to send the messages to any other account that you want. By far the easiest way to do this is to set up a new gmail account. So you’ll need to have a new gmail e-mail address together with it’s password. For the purposes of this article lets assume that it’s called email@example.com and that you eventually want to send these e-mails on to some destination address firstname.lastname@example.org. I’ve put anything.com as part of the destination address to emphasise that it doesn’t need to be a gmail address (though of course it can be if you want it to be).
Once you’ve created this gmail address then fill in the fields below like this:
The SMTP password is the password for your e-mail address. You can see that the SMTP login and the From fields are the same as the alert e-mail is going to come from this relay address and to be sent to your email@example.com address.
4. Now click on the Test button and look at the Journal tab closely to see what it says.If it says:
Mail: ‘Test message’ has been sent
or words to that effect then you know that it’s all working and you can go and check in your destination e-mail box for your message. You’ve now finished the set-up and can go to step 6
5. If on the other hand you get the message
Mail: login to smtp.gmail.com failed
then (assuming that you’ve correctly entered your account details in the dialog box) you’ve got one more step to do. Google have security settings for their accounts which by default restricts access from non-Google accounts so you need to change this setting. Go to your Google Account and you need to find the Apps with account access section (this changes location from time to time so you will need to navigate around until you find it). Switch on the less secure access part.
Once you’ve done this try your Test message again. You should now find that it all works.
6. That should be it. You shouldn’t ever need to access your relay gmail account again if you don’t want to and it will faithfully keep forwarding your messages on for you. Now that you’ve configured all this, any e-mail notifications that your Mt4 indicators or EA’s send will correctly work.