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 helpwanted, Today, 03:06 AM
            1 response
            12 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            9 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            5 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            387 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X