![]() |
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
|
|||||||
| Miscellaneous Support Miscellaneous support issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,240
Thanks: 83
Thanked 336 times in 328 posts
|
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.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
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... |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Please input your ISP's SMTP server information. If you do not know this information please contact your ISP and ask them.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
Ok, I tried that, and no luck either.
I'm receiving the error: Failed to send mail:503 #5.3.3 AUTH not available |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Certified NinjaScript Consultant
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
|
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; 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;
}
Code:
int sendMailVerify = SendMailLocal("toAcct@aol.com", "fromAcct@optonline.net", "Test Subject", "Some test message", "mail.optonline.net", "25");
mrLogik
"You look closely enough, you can find everything has a ... weak spot where it can break, sooner or later"
PureLogikTrading |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
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! |
|
|
|
|
|
#9 |
|
Certified NinjaScript Consultant
Join Date: Sep 2006
Location: New York, USA
Posts: 774
Thanks: 1
Thanked 7 times in 5 posts
|
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 |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |