Download MetaTrader 5

EA send log / log files via email

To add comments, please log in or register
James Parker
1017
James Parker  
Is it possible to code my EA to send me a copy of the log to my email address at specified intervals?

I see there's a SendMail function but not sure how to get information from the log into it.
Aleksei Beliakov
29413
Aleksei Beliakov  
You can do it either send mail or by external dll
Carl Schreiber
7295
Carl Schreiber  
1) Don't print into the logfile but append all to one string (per day, incl. \n) and send it with mt4's sendmail() function. 2) Use e.g. a powershell script to send the log file after the new day (I don't know yet, broker time or pc-time!) independently from mt4.
I wouldn't start powershell from mt4. Start it like a service.. 3) Use the Windows functions to read the logfile into a string and send the string with mt4's sendmail()
To add comments, please log in or register