Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to get Options>Misc>Mail Alert Messages To address programmatically

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

    How to get Options>Misc>Mail Alert Messages To address programmatically

    Hello,

    I would like to use the email address set in Options>Misc>Mail Alert Messages To address from within code. Is there any way to get that value? (I don't want to set it, just read it.)

    My intention is to use it in SendMail.

    Thanks.

    Scott
    sh_daggett
    NinjaTrader Ecosystem Vendor - NinjaLaunchpad

    #2
    It's been a while, but doesn't the "From email address" in SendMail usage not matter in this situation?

    It can be anything....and the mail that was setup in tools->options->misc is where it is sent from.

    But I'm guessing you really want the user name to uniquely identify who sent it probably to you?



    You could set up your own email parameters and password, that's available standard c# with a few #includes. I did it back in nt 6.5.


    Originally posted by sh_daggett View Post
    Hello,

    I would like to use the email address set in Options>Misc>Mail Alert Messages To address from within code. Is there any way to get that value? (I don't want to set it, just read it.)

    My intention is to use it in SendMail.

    Thanks.

    Scott

    Comment


      #3
      Hi Sledge,

      You're right, I think the from address doesn't matter in my case. I was just trying to find a way to make it so the user would not have to enter his email address twice for the "To:" part. (Once in options and once in properties.) I have set up a property for this, but I was hoping...

      Scott
      sh_daggett
      NinjaTrader Ecosystem Vendor - NinjaLaunchpad

      Comment


        #4
        "From email address" in SendMail does matter since the remote mail server may not allow inbox hosted on another mail server (i.e. strictmail.com where I have the default [email protected] may not allwo sending from [email protected])

        So the question is still actual: how to obtain the default email address in NinjaTrader?

        Comment


          #5
          Originally posted by alex.nt View Post
          "From email address" in SendMail does matter since the remote mail server may not allow inbox hosted on another mail server (i.e. strictmail.com where I have the default [email protected] may not allwo sending from [email protected])

          So the question is still actual: how to obtain the default email address in NinjaTrader?
          Write your own routine if need be.

          Possible Duplicate: Send email using System.Net.Mail through gmail. (C#) I am using this code to send email using C# .Net but it generates error at run-time. The Code is: MailMessage MyMailM...


          Allows applications to send email by using the Simple Mail Transfer Protocol (SMTP). The SmtpClient type is obsolete on some platforms and not recommended on others; for more information, see the Remarks section.

          Comment


            #6
            The question is not how to send email. The question is how to find out the email specified in options here Options>Misc>Mail Alert Messages To address, to avoid unnecessary input.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Stanfillirenfro, Today, 07:23 AM
            9 responses
            23 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by George21, Today, 10:07 AM
            0 responses
            6 views
            0 likes
            Last Post George21  
            Started by DayTradingDEMON, Today, 09:28 AM
            2 responses
            16 views
            0 likes
            Last Post DayTradingDEMON  
            Started by navyguy06, Today, 09:28 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            8 responses
            32 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X