MQL4参考 普通函数 SendMail

SendMail

Sends an email at the address specified in the settings window of the "Email" tab.

bool  SendMail(
   string  subject,       // header
   string  some_text      // email text
   );

Parameters

subject

[in]  Email header.

some_text

[in]  Email body.

Return Value

true –C if an email is put into the send queue, otherwise - false.

Note

Sending can be prohibited in settings, email address can be omitted as well. For the error information call GetLastError().

SendMail() function does not work in the Strategy Tester.

What's new in MQL5

In MQL5, the SendFTP, SendMail and SendNotification functions are moved to the new extended Network functions section. Now programs can exchange data with remote servers included in the list of allowed IP addresses. This means that MQL5 EAs are able to establish secure connections between processes using the TCP/IP protocol without using third-party DLLs.