Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendMail problems

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

    SendMail problems

    It seems that others have problems with this code, and I have looked at quite a few threads, but I still cannot get my code to work.
    I want to send an e-mail when a setup occurs on my indicator. I can get the setup to print to the Output Box, but the e-mail log gives an error message.
    My code is as follows
    SendMail("[email protected]", "[email protected]", "Trade Alert", "CxTSFup");
    and the error message from the log is
    Failed to send mail: System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 64.38.21.160 (64.38.21.160:25), connect timeout
    at System.Net.Mail.SmtpConnection.GetConnection(Strin g host, Int32 port)
    at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
    at System.Net.Mail.SmtpClient.GetConnection()
    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()
    ---------------
    [IMG]file:///C:/Users/BILLR%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG] Can anyone help to solve this problem. Thank you
    I tried to put a screen shot of the Options > Misc window, but it did not work

    #2
    Hello,


    Thank you for your note.



    What do you have setup for the mail server. Can you send a screenshot of your.

    Control Center->:tools->options->misc tab.


    I look forward to assisting you further.

    Comment


      #3
      SendMail problems

      Please find attached the screen shot of the Misc tab.
      Who is the User ? Is it my 8 digit a/c No for NT with the associated password, or is it something else.
      This is the error message in the LOG.

      7/10/2011 2:05:20 PM Default Failed to send mail: System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 64.38.21.160 (64.38.21.160:25), connect timeout
      at System.Net.Mail.SmtpConnection.GetConnection(Strin g host, Int32 port)
      at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
      at System.Net.Mail.SmtpClient.GetConnection()
      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()
      Thank you,
      Bill
      Attached Files

      Comment


        #4
        SendMail problems

        Also, I cannot send a test message.
        The attached file is the error message.
        I hope that you can fix my problem. Thank you. Bill
        Attached Files

        Comment


          #5
          Bill, if you enter custom settings here for the user name / password and server this would be for example your ISP's or email providers settings. If you can let me know which one you use I can check for the settings needed and forward them to you to resolve hopefully.

          Thanks,
          BertrandNinjaTrader Customer Service

          Comment


            #6
            SendMail problems

            Hello Bertrand,
            I had to wait until my ISP opened today (Monday) to get the info. He was very helpful, but not too confident that he had given me the solution. However, it WORKED !!!!. Very happy.
            The marked up screen shot of the last tag in Options is shown below.
            Thank you for your help and I hope that my submissions will help others that find themselves in the same position.
            All the best,
            Bill R
            Attached Files
            Last edited by oldhiker; 10-10-2011, 05:48 AM. Reason: Attachment did not attach

            Comment


              #7
              Glad to hear that Bill, could you please recheck the screenshot you (I believe) intended to share here?

              Thanks,
              BertrandNinjaTrader Customer Service

              Comment


                #8
                SendMail problems

                Hello Bertrand,
                I was using a *.docx and it would not accept, so I have amended my reply with a *.doc file and it appears to have worked, please see below

                Comment


                  #9
                  Originally posted by oldhiker View Post
                  Hello Bertrand,
                  I was using a *.docx and it would not accept, so I have amended my reply with a *.doc file and it appears to have worked, please see below
                  Thanks much, that worked better!
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bortz, 11-06-2023, 08:04 AM
                  47 responses
                  1,602 views
                  0 likes
                  Last Post aligator  
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  12 views
                  0 likes
                  Last Post Javierw.ok  
                  Working...
                  X