MT4 can already send emails. Just configure it and then you can use it in your code.
I will appreicate if you can send me a mail on how to configure it. Thanks
its in the MT4 options dialog. First you need an email account somewhere (you probably already have one) that will be used to send the mails. The emails will originate from this account. MT4 will log in there and send an email through this account to the recipient. MT4 needs to know the following
- the SMTP server of your email account
- the login and password of your email account (so it can log-in to this account)
- From: the email address belonging to this email account (will appear as the sender address)
- To: any other email address in the world (for example your cell phone email address or whatever) to where the mails should be sent
MT4 will then be able to log-in to the above mentioned email account (as if it were you, sending an email) and send an email from this account to the recipient you set in the To field.
(i used the colors to make clear what belongs to what)
You can then use the SendMail() function instead of alert.
its in the MT4 options dialog. First you need an email account somewhere (you probably already have one) that will be used to send the mails. The emails will originate from this account. MT4 will log in there and send an email through this account to the recipient. MT4 needs to know the following
- the SMTP server of your email account
- the login and password of your email account (so it can log-in to this account)
- From: the email address belonging to this email account (will appear as the sender address)
- To: any other email address in the world (for example your cell phone email address or whatever) to where the mails should be sent
MT4 will then be able to log-in to the above mentioned email account (as if it were you, sending an email) and send an email from this account to the recipient you set in the To field.
(i used the colors to make clear what belongs to what)
You can then use the SendMail() function instead of alert.
thanks for the quick response. i use smtp.gmail.com:465 but it is still not going? WHat did u think am doing wrong?
thanks for the quick response. i use smtp.gmail.com:465 but it is still not going? WHat did u think am doing wrong?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I read the "Secrets of MetaTrader 4 Client Terminal: Alerting System" and it occurred to me that if you can use an .exe file instead of the sound file, couldn't you use the MT4 email .exe file (I'm not a programmer so I'm taking a leap of logic here) to have the alert send you an email through the MT4 email system already there instead of just playing a sound? Assuming of course that you have the MT4 email setup enabled and configured properly ...
I use semi-automatic EAs and it would be extremely helpful to have the alerts trigger an email which I could route to my cell phone via SMTP2GO instead of just playing a note or two which I usually don't hear. Anyone else try this or know how to make this work? ... or know why it wouldn't work?