Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Send Mail with some account info

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

    Send Mail with some account info

    I've set the share "Mail" service and it works. Now I'm re-coding an old Algo from NT7 which had this line for email:

    Code:
    SendMail ("[email protected]", "[email protected]", "SERVER DOWN ! ", Position.MarketPosition.ToString() + " " + Position.Quantity.ToString()+" at " +Position.AvgPrice.ToString("0.00"));
    But I'm reading in the manual that the send mail service contains 3 arguments. Is there any way to send it equally as NT7 did it?

    Thanks

    #2
    Hello pstrusi,

    SendMail(string to, string subject, string text)

    Below is a link to the help guide.


    Unfortunately, the from address cannot be specified, as this will be the email address used for the share service.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response, Chelsea, What I'm really looking for is not the "from address", What I want is to put in the body of email, certain account info, as I put above.
      Can be done?

      Comment


        #4
        Hello pstrusi,

        The string text is the is body of the email.

        You can send any info that is text that you want.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          So if you wanted to send certain account info like Position, Quantity, Price...etc, Do they have this info converted previously to text in order to put it in the body or can I put it directly" ?

          Nevermind, silly me. Obviously, this info is converted to text. Sorry

          Comment


            #6
            Hello pstrusi,

            Yes. Your suggested code in post # 1 does this.

            You just need to use the proper overload parameters (i.e. remove the from address parameter).
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            173 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            328 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            252 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            354 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            181 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X