Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SendMail error

    I recently upgraded to version 8.0.28.0 and now SendMail is no longer working. Every time my strategy tries to send an email I get the following error message:

    "There was an error while sharing from the share service {gmail}: "the calling thread must be STA, because many UI components require this"

    I do have additional data series in my strategy; I gather that triggers multi threading with NT but at the start of the OnBarUpdate() method I have the following code:

    Code:
    if (BarsInProgress != 0)
    return;

    I note the help page on multi threading makes mention of Dispatcher but after playing around with it a bit I still couldn't get it to work - no emails and the same error message. Help would be much appreciated as it's very disappointing to have an upgrade break something that was working just the day before.


    #2
    Hello newuser,

    Thank you for your post.

    Are you able to send a test message to your email from the Control Center > Tools > Options > General > Share services page? If so, I do suspect you may need to call SendMail() from within a dispatcher. What information are you trying to send with SendMail()?

    As you mentioned, the multi-threading page gives some information about using a dispatcher:There is also a snippet that uses a dispatcher on the UserControlColleciton page:Do you recall what version you were using prior to the 8.0.28.0 update? I can't think of any changes that would have had an effect on SendMail() between a previous version and the CQG serrver certificate update for 8.0.28.0.

    Please let me know if I may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by maybeimnotrader, Today, 05:46 PM
    0 responses
    6 views
    0 likes
    Last Post maybeimnotrader  
    Started by quantismo, Today, 05:13 PM
    0 responses
    6 views
    0 likes
    Last Post quantismo  
    Started by AttiM, 02-14-2024, 05:20 PM
    8 responses
    166 views
    0 likes
    Last Post jeronymite  
    Started by cre8able, Today, 04:22 PM
    0 responses
    8 views
    0 likes
    Last Post cre8able  
    Started by RichStudent, Today, 04:21 PM
    0 responses
    5 views
    0 likes
    Last Post RichStudent  
    Working...
    X