Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Send mail not working

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

    Send mail not working

    Hello,

    I'm experiencing the same issue exposed on this thread: http://www.ninjatrader.com/support/f...ad.php?t=50902

    When I send a mail from Misc tab it works perfectly but not always from my strategy.

    I paste the code snippet I use:

    if (ConnectStart == true && !Historical)
    {
    ConnectStart = false;
    SendMail("[email protected]", "[email protected]", "mail", "mail");
    }


    When I restart NT sometimes it works sometimes it doesn't but now I experience this issue permanently.

    Any Idea on how to solve it?

    thanks

    #2
    guillembm, have you verified via prints that the actual condition then to send the mails triggers consistently as you expect from it?

    Could any local security software perhaps intercept the calls / mails? Would this change if you disabled software completely for a test?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Yes, When the sendmail() is called I use to output a print to verify it.

      I also tested without antivirus and firewall and the result is the same. But I doubt this is the problem because I already sent messages before with antivirus and firewall on. If I can send mails from Misc tab it should work from the method.

      I insist that, sometimes, after restarting NT it works again. Sometimes it doesn't

      Comment


        #4
        Ok, understood guillembm - can you please send your testing scripts with steps taken to support at ninjatrader dot com, so we can attempt reproducing it inhouse here?

        If you multiple PC's to test, would this be happening on all or just one particular setup / OS?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Same Issue, SendMail not working

          Hello,

          I have set up the Tools->Options->Misc->Mail Setup and the test email works properly.

          My strategy used to send email correctly and then at some point it stopped working. I can't say exactly when this was. This is still the case so I created a very basic strategy to just send an email. This is not working. Here is the code:

          Code:
                  
          protected override void OnBarUpdate()
                  {
                      
                      
                      if (!Historical)
                      {
                          Print ( "Sending Email:  Historical = " + Historical.ToString() );
                          SendMail("[email protected]","[email protected]","Subject", "Stratgey Email Test");            
                      
                      }
                  }
          The output window shows:
          Sending Email: Historical = False
          There is no information on the Control Center Log tab related to the email.

          Please let me know what further troubleshooting can be done with this issue.

          Comment


            #6
            Please first check your spam folder as well to ensure they aren't being directed to spam.

            Additionally I know you said you ran the Mail Test but could you please try setting up your email account as described in this post.

            Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not


            Please let us know if the above resolves your issues or if we may be of any further assistance.
            LanceNinjaTrader Customer Service

            Comment


              #7
              Lance,

              I've modified my settings to use the format shown in the support note that you referenced.

              I substituted my username at gmail where you have "NinjaTrader" listed and used my password. I'm assuming that is what you intended. I clicked Ok and then reopened the mail settings and was able to successfully send the test email.

              I reran my basic strategy but it once again failed to send the email. The output window shows that Historical=false. Again, no email and no information or error messages in the Log.

              -Thanks

              Comment


                #8
                Even though the guide says not to, can you try using your full gmail address in the username mail settings and testing again?
                Example: [email protected]

                Do you receive an email in your gmail that says test successful?

                If the error persists please send the complete script that replicates the error to support [at] ninjatrader [dot] com

                Located in (MY)Documents\NinjaTrader 7\bin\Custom\Strategy
                LanceNinjaTrader Customer Service

                Comment


                  #9
                  Lance,

                  I've tested using the full address with the same results. The Test Email button successfully sends the email but the Strategy fails to send the email.

                  I've sent my Strategy file to the support email address.

                  -Thanks

                  Comment


                    #10
                    SendMail not working

                    Good day,
                    facing the same issue. Sending the mail through the options>misc setting window works, sending it through coding doesnt.
                    There are no conditions to be fulfilled, the coding goes through the statement.
                    Anything wrong with it?
                    Ty, Matthias

                    SendMail("[email protected]", "[email protected]", "ENTERED TRADE", " TEST MAIL");

                    Comment


                      #11
                      Thank you for your question kuchen. Please review the thread here for tips setting up e-mail with gmail.



                      If the advice in that thread does not resolve your query, please begin a new thread rather than replying to this thread from 2013. This will aid other users searching for answers to similar queries. We will be happy to help in any way we can.
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_JessicaP View Post
                        Thank you for your question kuchen. Please review the thread here for tips setting up e-mail with gmail.



                        If the advice in that thread does not resolve your query, please begin a new thread rather than replying to this thread from 2013. This will aid other users searching for answers to similar queries. We will be happy to help in any way we can.
                        I'm also having the same problem. Was working and has now stopped in the strategy. Which forum post do you want us to use to discuss this matter thanks?

                        Comment


                          #13
                          Hello darrentate,

                          Thank you for your post.

                          I will work with you on your email you sent in to platformsupport[at]ninjatrader[dot]com.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by sidlercom80, 10-28-2023, 08:49 AM
                          166 responses
                          2,233 views
                          0 likes
                          Last Post sidlercom80  
                          Started by thread, Yesterday, 11:58 PM
                          0 responses
                          1 view
                          0 likes
                          Last Post thread
                          by thread
                           
                          Started by jclose, Yesterday, 09:37 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post jclose
                          by jclose
                           
                          Started by WeyldFalcon, 08-07-2020, 06:13 AM
                          10 responses
                          1,414 views
                          0 likes
                          Last Post Traderontheroad  
                          Started by firefoxforum12, Yesterday, 08:53 PM
                          0 responses
                          11 views
                          0 likes
                          Last Post firefoxforum12  
                          Working...
                          X