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 Wave333, Today, 02:09 PM
        2 responses
        17 views
        0 likes
        Last Post Wave333
        by Wave333
         
        Started by AyeSir, 04-19-2025, 03:01 PM
        4 responses
        39 views
        0 likes
        Last Post AyeSir
        by AyeSir
         
        Started by M_ichel, Today, 02:21 PM
        0 responses
        7 views
        0 likes
        Last Post M_ichel
        by M_ichel
         
        Started by manteored, 02-16-2023, 10:24 AM
        7 responses
        1,643 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by Mike8085, 06-11-2013, 04:00 AM
        10 responses
        7,368 views
        0 likes
        Last Post alanbb8989  
        Working...
        X