Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail() Function

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

    SendMail() Function

    Hello,

    I'm new to NT and this forum. I've been trying to make my FX strategy through NT and have it send me an email every time an order goes through or not. I have all the "logic" part done, but the SendMail feature does not work. I searched through and read all the other posts on this topic (there are many), but none of the suggestions seemed to help.
    When I go to Tools-Options-Misc. and send a test email (with default settings), it works, but it does not work in the strategy (Ninjascript strategy) sending to the same email.

    I tried making another strategy alltogether just to see if sending the email works, and it does not. I put a few simple lines of logic, and ask the strategy to SendMail() and Print(). The Print() works, but SendMail() does not. I put the SendMail() before the Print() to make sure the computer "read" SendMail() before going on to Print().

    And no, I am not doing a historical backtest, but a demo account live strategy (I add it to the strategies I'm running, and click start and wait until the Print() function I programmed comes up in the Output window.) Is that the problem? Do I need a real live trading account (with money - not demo or simulation) for the SendMail to work?

    Here's what I tried so far:

    SendMail("", "[email protected]", "The email sent", "Email Sent")
    SendMail("[email protected]", "[email protected]", "The email sent", "Email Sent")
    SendMail("[email protected]", "[email protected]", "The email sent", "Email Sent")

    Is there anything else I should try? I tried being as detailed as possible, but could be more detailed if need be.
    Thanks,

    #2
    Hello,

    I am sure you have seen this link, but just in case:


    At the bottom it mentions:

    Tips
    1. If mails are not sent, check the Control Center Log tab for any error information. You can also try changing the SMTP outgoing mail server to use your own ISP's mail server. You can set this information via the Control Center window Tools > Options > Misc.


    Have you tried these?
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    572 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    550 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X