forked from vzhomeexperiments/Include
-
Notifications
You must be signed in to change notification settings - Fork 0
/
18_EmailFromMT4.mqh
48 lines (42 loc) · 1.96 KB
/
18_EmailFromMT4.mqh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//+-------------------------------------------------------------------+
//| 18_EmailFromMT4.mqh |
//| Copyright 2020, Vladimir Zhbanko |
//+-------------------------------------------------------------------+
#property copyright "Copyright 2020, Vladimir Zhbanko"
#property link "https://vladdsm.github.io/myblog_attempt/"
#property strict
// function to send email from the terminal
// version 01
// date 14.08.2020
//+-------------------------------------------------------------+//
// Aim of this function is to send email from the terminal
// do that weekly to check health of the system
//+-------------------------------------------------------------+//
/*
Function Functional Description:
Function is intended to fire email to the trader to reflect health of the terminal
1. Maintain un-secure google account
2. Confirm that the terminal work
3. To be used from the Watchdog EA
User guide:
1. #include this file to the folder Include
2. That function must be activated weekly on Monday Morning
*/
//+------------------------------------------------------------------+
//| FUNCTION EMAIL FROM MT4
//+------------------------------------------------------------------+
void EmailFromMT4(int Magic)
{
bool mailres = SendMail("Weekly Terminal Check",
"Hello,\n"
"If you recieve this email it means that MT4 Trading terminal works fine! \n"
"Server Time is :" + TimeToString(TimeCurrent()) + "\n"
"MagicNumber of sending Robot is: " + IntegerToString(Magic));
if(mailres == false)
{
Alert("Error sending email");
}
}
//+------------------------------------------------------------------+
//| End of FUNCTION EMAIL FROM MT4
//+------------------------------------------------------------------+