Insert time in a email body

 

Hello,

I want to insert the current time in a email body or subjet, in a indicator.

 The email have this form:

Subjet: Buy alert

Body: 11h35 Buy alert in H1 

For make a mail no problem: SendMail("Buy alert","Buy alert in H1") 

But you know how to insert the timecurrent() paramètre for had it in the mail?  

Thank you for your answer. 

Documentation on MQL5: Date and Time / TimeCurrent
  • www.mql5.com
Date and Time / TimeCurrent - Documentation on MQL5
 

Convert current time to string with TimeToString().

Documentation on MQL5: Conversion Functions / TimeToString
  • www.mql5.com
Conversion Functions / TimeToString - Documentation on MQL5
 

I make a string like that:

 string  TimeToString(

   datetime  value,                           // number
   int       mode=TIME_DATE|TIME_MINUTES      // output format
   );

But how to integrate it in SendMail() function.

Thanks.

Documentation on MQL5: Common Functions / SendMail
  • www.mql5.com
Common Functions / SendMail - Documentation on MQL5
 
string body="";
body="some text"+TimeToString(TimeCurrent());
SendMail("subject",body);
Something like this. Sorry I post from my phone and i dont see code tag.
 
Ok merci, it's working...