Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Unable to send mail from a script. Test email works.

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

    Unable to send mail from a script. Test email works.

    Hi. I created an indicator to send me an email alert when a price threshold is exceeded.

    The interactive "Test Mail" option under the [Misc] tab does work. Using the following line, alone in a script does not work:

    SendMail("my_account@my_asp.com", "[email protected]", "Trade Alert", "Buy ES");

    I even used Wireshark in order to troubleshoot. I see nothing going through the wire when I press F5. I see the entire conversation going ok with the smtp server when I do the test mentionned above.

    I even added the Log() command to make sure something was happening. The script works. It's like the scripting engine won't spit out the order to send mail. How do I troubleshoot this?

    mp

    #2
    Hello marcusplexus,

    If there is a problem sending an email, it should show up inside of your Trace file located in (My) Documents -> NinjaTrader 7 -> trace folder.

    If you would like for me to take a look you may send me your log and trace files for today so that I may look into what occurred.

    You can do this by going to the Control Center-> Help-> Mail to Support.

    Please reference the following ticket number in the body of the email: ATTN: JC with reference to this thread.

    Note that SendMail() will also only work when running on Real-Time Data, so if the condition that is true when if (Historical) is true will not produce an email but it will still Print.




    JCNinjaTrader Customer Service

    Comment


      #3
      Ok. Back in the days you would get flooded by emails with older bars hitting the threshold. The live feed connection was the issue. Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by f.saeidi, Today, 12:14 PM
      8 responses
      18 views
      0 likes
      Last Post f.saeidi  
      Started by Mikey_, 03-23-2024, 05:59 PM
      3 responses
      49 views
      0 likes
      Last Post Sam2515
      by Sam2515
       
      Started by Russ Moreland, Today, 12:54 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by philmg, Today, 12:55 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by TradeForge, 04-19-2024, 02:09 AM
      2 responses
      32 views
      0 likes
      Last Post TradeForge  
      Working...
      X