How can i send to different Mail-accounts with 2 EA`s ?

 

Hello, i`m searching for the possibility to send messages from many EAs to different mail-accounts.
Example: EA1 should send from paul@lalala.com to test1@lalala.com and EA2 send from paul@lalala.com to test2@lalala.com

The Problem is in MT5 Option > E-Mail>  from ... to... onlya one settings.

Who can i do this ?

Thanx for answers

 
LaExpert: Hello, i`m searching for the possibility to send messages from many EAs to different mail-accounts. Example: EA1 should send from paul@lalala.com to test1@lalala.com and EA2 send from paul@lalala.com to test2@lalala.com. The Problem is in MT5 Option > E-Mail>  from ... to... onlya one settings. Who can i do this ?

Here are some options, but there are others possible solutions:

  • Use MQL5 Sockets to communicate with a standard SMTP server to send emails to anyone.
  • Use WebRequest to send messages via a web-based e-mail service.
  • Write to a text file and have an external 3rd party application read the text files and dispatch them.
 
Fernando Carreiro #:

Here are some options, but there are others possible solutions:

  • Use MQL5 Sockets to communicate with a standard SMTP server to send emails to anyone.
  • Use WebRequest to send messages via a web-based e-mail service.
  • Write to a text file and have an external 3rd party application read the text files and dispatch them.
Thank you, i dont know about Sockets. Can write Socket in a EA code or is it a external program? Have you a example, how i can this in an EA-Code ?
 
LaExpert #: Thank you, i dont know about Sockets. Can write Socket in a EA code or is it a external program? Have you a example, how i can this in an EA-Code ?

Did you not follow the link I gave you? It is the documentation for coding MQL5 Sockets in MQL (not external) with some basic example code.

As for the SMTP protocol, that is beyond the scope of this forum, and you will have to do your own research. Search on the web for a simple SMTP client in C or C++ for a reference and port it to MQL5 Sockets.

 
Fernando Carreiro #:

Did you not follow the link I gave you? It is the documentation for coding MQL5 Sockets in MQL (not external) with some basic example code.

As for the SMTP protocol, that is beyond the scope of this forum, and you will have to do your own research. Search on the web for a simple SMTP client in C or C++ for a reference and port it to MQL5 Sockets.

Thank you, its working with SendMail and different MT5 instances.
Reason: