You can use DLL calls or create your own SMTP client with MQL5 Sockets. Another option is to use a service provider that offers a web-api for email, or maybe create your own external mail relay server with a web-api, which you can call with WebRequest.
As for documentation on sockets, you can study general information on the web about windows sockets or even *nix based sockets.
You will also have to learn about the SMTP protocol.
- www.mql5.com
Thank you Fernando,
I'll take a look at the possibilities you mentioned.
You can use DLL calls or create your own SMTP client with MQL5 Sockets. Another option is to use a service provider that offers a web-api for email, or maybe create your own external mail relay server with a web-api, which you can call with WebRequest.
As for documentation on sockets, you can study general information on the web about windows sockets or even *nix based sockets.
You will also have to learn about the SMTP protocol.
Fernando,
I'm running some tests with Sockets and the communication only works when I enter the website in the Tools > Options > Expert Advisors > "Allow WebRequest for listed URL"
Is there any other way to bypass this configuration?
I think there is since I saw a Script from another guy who send email and I do not need to configure anything in the MT
Thanks,
Ademir
No, it is part of MetaTrader's sandbox security. One option however, is to use DLL calls to the Windows API.
Please note, that if you plan to sell it on this sites Market, you will not be allowed to use DLL calls.
Even if you sell it externally, the end user will also not be able to use MQL5 VPS service either because DLL calls are not allowed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I'd like to create an EA to send email but without the option to setup the MT5 with the mailserver name, port, etc.
I'm searching and the other possible solution is to use socket, is it right?
If so, is there any article or documentation you can point me to read and better understand its functionality besides of MQL5 documentation?
Thanks,
Ademir