Notification Mail wait

Created at 20 Dec 2023, 20:00
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AL

AlexFrei

Joined 05.06.2023

Notification Mail wait
20 Dec 2023, 20:00


Hello all,

If algo meets some condition in my Bot, I need send an email and stop bot. 

If (something)

{

        Notifications.SendEmail(….);

        Stop();

}

 

It looks good. If I debug this code, it works and email is sent. But If I run it, it doesnt work. I supposed email sending has its own thread and if bot stops, this thread is cancelled, so email is not sent. 

So does anybody know the right solution please - how to wait for email was really sent ? 

Thanks.

Alex


@AlexFrei