else if(State == State.Realtime)
{
System.Threading.Thread.Sleep(10000);
SendMail(EmailAddress, mailsubject, mailbody);
Print("Email has been sent" + DateTime.Now);
}
Emails are received BUT NOT EVERY TIME. Sometimes mail is received and other times it is not. There are no log messages when the email is not received. Print message in the Ninja script output window is received always, it is never missed. I can say that around 5/10 emails are received and rest of the 5 are missed.
Ninja script experts, please point out if I am making any mistake or advice how can I get email reliably. The limitation is that it is not possible for me to put this piece of code in OnBarUpdate because the report about historical data has to be transmitted in any case whether the real time price data which calls OnBarUpdate is coming in or not.
Many thanks
Comment