NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 09-23-2008, 05:39 AM   #1
b-rock
Junior Member
 
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Default Can't Send Mail

Hi,

I'm using the "Testmail" function under the Misc. tab, and when attempting to send an email I get the following Error:

Failed to send email: Error connecting to server. 81.169.163.72





I've left the SMTP field blank for default.
b-rock is offline  
Reply With Quote
Old 09-23-2008, 06:01 AM   #2
NinjaTrader_Jason
NinjaTrader Customer Service
 
NinjaTrader_Jason's Avatar
 
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,240
Thanks: 83
Thanked 336 times in 328 posts
Default

Somehow NinjaTrader could not send the email, since it could not connect to the server. Please check for software, such as (corporate) firewalls, pop up blockers and anti-virus software, that could be blocking the connection.
NinjaTrader_Jason is online now  
Reply With Quote
Old 09-23-2008, 07:37 AM   #3
b-rock
Junior Member
 
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Default

I don't have any of those things operating.

I don't know if this is relevant but when I type that IP address into my browser it can't connect either...
b-rock is offline  
Reply With Quote
Old 09-23-2008, 08:28 AM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Please input your ISP's SMTP server information. If you do not know this information please contact your ISP and ask them.
NinjaTrader_Ben is offline  
Reply With Quote
Old 09-23-2008, 09:33 AM   #5
b-rock
Junior Member
 
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Default

Ok, I tried that, and no luck either.

I'm receiving the error:

Failed to send mail:503 #5.3.3 AUTH not available
b-rock is offline  
Reply With Quote
Old 09-23-2008, 09:40 AM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

This is an error in getting authentication for your SMTP use. Please ensure you have SMTP information from your ISP along with the proper credentials to use it. You would put these inside the Tools->Options->Misc tab.
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-23-2008, 10:37 AM   #7
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

Hey,

I had a similar problem with my ISP and they're email. The solution I found is to code up my own Email function within NinjaScript.

You have to add this to the "Using" at the top of your code.
Code:
using System.Net.Mail;
Then this is the function
Code:
        public int SendMailLocal(String iToAddress, String iFromAddress, String iSubject, String iBody, String iSMTPClient, String iPort)
        {
            try
            {
                // To
                MailMessage mailMsg = new MailMessage();
                mailMsg.To.Add(iToAddress);

                // From
                MailAddress mailAddress = new MailAddress(iFromAddress);
                mailMsg.From = mailAddress;

                // Subject and Body
                mailMsg.Subject = iSubject;
                mailMsg.Body    = iBody;

                // Init SmtpClient and send
                SmtpClient smtpClient = new SmtpClient(iSMTPClient, Convert.ToInt32(iPort));
                System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(iPort, iPort);
                smtpClient.Credentials = credentials;

                smtpClient.Send(mailMsg);
                return 1;
            }
            catch (Exception ex)
            {
                Print(ex.Message.ToString());
                return -1;
            }
An example function call is
Code:
int sendMailVerify = SendMailLocal("toAcct@aol.com", "fromAcct@optonline.net", "Test Subject", "Some test message", "mail.optonline.net", "25");
Let me know if you have any trouble.

mrLogik
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 09-23-2008, 10:46 AM   #8
b-rock
Junior Member
 
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Default

Hey thanks Mrlogic,

However I already did a bit of a workaround of my own by using a service called "authsmtp" which is an smtp mail relay service. It's working well, (for a small fee of course).

But thanks a lot for your suggestion, and let's hope it helps some others out here. I know when I searched there were a few cases of this problem without any fixes it seemed.

Cheers!
b-rock is offline  
Reply With Quote
Old 09-23-2008, 11:26 AM   #9
mrlogik
Certified NinjaScript Consultant
 
mrlogik's Avatar
 
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
Default

My solution won't cost anything if you get tired of using authsmtp :-)

have a nice day
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"

PureLogikTrading
mrlogik is offline  
Reply With Quote
Old 06-19-2009, 06:52 PM   #10
avanza
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi.
I tried your code but I canīt get it to work. Iīm no "coder" so I made a strategy using wizzard. Then I tried to insert your code but couldnīt get it to work. The "using"-part I put in the begining of the script and the code in the end and last I put the "int sendMailVerify = SendMailLocal... ". Is this correct?
avanza is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant mail to support starrynight Miscellaneous Support 1 09-17-2008 02:58 AM
E-mail from tradestation does not work callan300 Automated Trading 11 07-13-2008 01:22 PM
E-mail Sent Upon Order Execution dgregor5 Strategy Development 13 10-07-2007 02:11 PM
NT and TradeStation Using the e-mail Subsystem daven Automated Trading 1 08-20-2007 10:04 AM
Mail ATI Questions MindSabre Automated Trading 5 06-27-2007 03:57 AM


All times are GMT -6. The time now is 09:42 AM.