Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 Beta13 sendmail not working

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

    NT7 Beta13 sendmail not working

    I am using Sendmail in the onbarupdate of an indicator to alert me when a condition occurs along with drawing an arrow at candle. However, the arrow gets drawn but sendmail does nothing. Not sure if this is a bug or I am doing something wrong.

    -Alex

    #2
    Alex, any errors in the log as this happens? Is the regular SendMail feature working as expected when you test via Tools > Options > Misc.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Betrand,

      If I send a test email, it works just fine. However looking at the trace file I get

      2010-04-08 09:38:20:603 ERROR: Failed to send mail: System.Net.Mail.SmtpException: The operation has timed out.
      at System.Net.Mail.SmtpClient.Send(MailMessage message)
      at NinjaTrader.Cbi.Globals.SendMailNow(String from, String to, String cc, String subject, String body, String[] attachmentPaths)
      at NinjaTrader.Cbi.Globals.MailThreadProc()
      2010-04-08 09:40:20:626 ERROR: Failed to send mail: System.Net.Mail.SmtpException: The operation has timed out.
      at System.Net.Mail.SmtpClient.Send(MailMessage message)
      at NinjaTrader.Cbi.Globals.SendMailNow(String from, String to, String cc, String subject, String body, String[] attachmentPaths)
      at NinjaTrader.Cbi.Globals.MailThreadProc()

      Every time a signal is triggered in my chart, I get a pop up window saying mail queue overflow. one or more mails have been dropped.

      Comment


        #4
        I noticed also, that when pressing test mail button in misc tab, nt freezes every so often and becomes totally unresponsive. Forcing me to kill process in task manager. I am using gmail, with smtp.gmail.com and port 465 SSL unchecked.

        Comment


          #5
          Thanks for the replies Alex, can you please try using the standard entries (blanked out)?

          Also: please ensure no firewall is hindering the communication to the mail servers, the timeout error you got likely points to this reason for the issue.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Ok I disabled firewall and blanked out all email fields and test mail button works without getting stuck for more than a few secs. However sendmail does absolutely nothing inside one of my indicators where before it was getting stuck while email fields had logging data for gmail.

            I am attaching a sample test script that should generate plenty of emails when close crosses above or below ema5 using 5R. The trace file shows nothing about sending any emails. Hope this helps in debugging.

            -Alex
            Attached Files

            Comment


              #7
              Alex, your script works perfectly here for me - do you have another email address to try? Please use the default settings under Tools > Options > Misc and then just do this for example -

              Code:
              if(CrossAbove(Close,EMA(5),1) || CrossBelow(Close,EMA(5),1))
              			{
              				SendMail("your first email address","your backup email address",Instrument.FullName,"");
              				DrawDot("mydot" + CurrentBar, true, 0, Low[0], Color.Aquamarine);
              			}
              The dot will give you a visual clue to check the condition hits home and when it does.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Thanks for testing it. Looked further and noticed there is an issue with my email. Problem was fixed using an alternate email. Many thanks again

                Alex

                Comment


                  #9
                  Great this works now for you, you're welcome.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by RubenCazorla, Today, 09:07 AM
                  2 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by i019945nj, 12-14-2023, 06:41 AM
                  7 responses
                  82 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by timmbbo, 07-05-2023, 10:21 PM
                  4 responses
                  158 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by tkaboris, Today, 08:01 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by Lumbeezl, 01-11-2022, 06:50 PM
                  31 responses
                  820 views
                  1 like
                  Last Post NinjaTrader_Adrian  
                  Working...
                  X