//+------------------------------------------------------------------+
//| SendMail.mq5 |
//| Copyright 2024, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, MetaQuotes Ltd."
#property link "https://www.mql5.com
#property version "1.00"
#define SUBJECT "Test SendMail"
#define TEXT "Text for SendMail() function"
//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 함수 |
//+------------------------------------------------------------------+
void OnStart(void)
{
//--- 터미널에서 이메일 전송 권한을 확인하세요
if(!TerminalInfoInteger(TERMINAL_EMAIL_ENABLED))
{
Print("Error. 클라이언트 터미널이 이메일 메시지를 보낼 수 있는 권한이 없습니다.");
return;
}
//--- 메일 보내기
ResetLastError();
if(!SendMail(SUBJECT, TEXT))
Print("SendMail() failed. Error ",GetLastError());
}
|