Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail()

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

    SendMail()

    I have a strategy that I've set up for AutoTrading. Inside OnBarUpdate, I have some conditionals that fire off orders. The orders are being generated and submitted correctly; however, I also have a SendMail() line in there to send email alerts when these orders are generated. The "Test Mail" function in Tools -> Options works, so I know the SMTP is set up correctly. However, no mail is being generated when orders are submitted, and no entries are being made in the log. Any suggestions on where to look from here?

    #2
    Are you sending mail from and to the correct email account? You may want to check on your ISP's end to see if they are blocking any mail. If there are no errors in NinjaTrader it means the mail has left the software and is probably getting snagged elsewhere.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Yes, I'm sending via the correct email accounts. As mentioned, the test emails send properly (and the fact that a test mail has been sent is logged). However, in this case no errors or anything whatsoever are being logged, there is simply no mail being sent.

      Comment


        #4
        Then you will need to debug your strategy logic to see if mail is even suppose to be sent. Use Print() to see if the mail is suppose to be sent. Again, if it was suppose to be sent and the function was triggered with no errors that means the mail has went out and is getting snagged outside of the software. Test mail working doesn't mean your email won't get snagged for any other reason.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by r68cervera, Today, 05:29 AM
        0 responses
        2 views
        0 likes
        Last Post r68cervera  
        Started by geddyisodin, Today, 05:20 AM
        0 responses
        3 views
        0 likes
        Last Post geddyisodin  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        6 responses
        33 views
        0 likes
        Last Post JonesJoker  
        Started by GussJ, 03-04-2020, 03:11 PM
        12 responses
        3,239 views
        0 likes
        Last Post Leafcutter  
        Started by AveryFlynn, Today, 04:57 AM
        0 responses
        6 views
        0 likes
        Last Post AveryFlynn  
        Working...
        X