EA send log / log files via email

 
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.
 
You can do it either send mail or by external dll
 
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()
Reason: