MQL4 - automated forex trading   /  

Forum

Why does my SENDMAIL not work?

Back to topics list To post a new topic, please log in or register

avatar
12
MARSHALL18 2007.04.19 01:05 
I have lines of code like the following:
if(Ordersend(....)>=0)
sendmail(...);

It does NOT work. mails are never sent out. Anyone can help?
Thanks
article

Video interview with Rashid Umarov

The main conclusion is that it is insufficient to have a profitable strategy: it is necessary to strengthen its advantages and smooth its disadvantages. This is the point in money management: You should gain the largest profit from your approach, your Expert Advisor, your system with minimal risk and in maximal amounts, without being short of it. This is the most important thing, to my mind.


avatar
4
tst4all 2007.04.19 03:24 

avatar
12
MARSHALL18 2007.04.19 10:05 

I have setup the email account, test messages were successfully sent. but the code do not work. why?
I can not figure out what is wrong with the code:
if(OrderSend(......)>=0)
Sendmail(......);

Anyone can help?
thanks


avatar
Moderator
28803
Rosh 2007.04.19 12:23 
Modify code and check it on-line

if(OrderSend(......)>=0)
      {
      Print("Try to send mail at ",TimeToStr(TimeCurrent()));
      Sendmail(......);
      }


avatar
12
MARSHALL18 2007.04.20 10:57 
I insert the code Print("Try to send mail...), Nothing happened. I did not see "try to send mail at..." in the journal, but pending orders were placed. Anyone pls help. thanks.

avatar
Moderator
28803
Rosh 2007.04.20 15:36 
Put whole code, please. In back-testing sending of e-mails is not allowed.

avatar
12
MARSHALL18 2007.04.20 21:44 

It is a live test, I have seen the message "try to send mail at....", emails were not sent. why?
thanks


avatar
9
fari 2007.04.21 16:19 
Hi Marshall,

I had also big troubles sending emails,
I learned, that SSL connections for SMPT might not work.

I tried several smtp server, finally one worked.

My debugging process:
1) go to Tools->Options->eMail
2) Enter a SMTP server and press the Test button.
3) Open the terminal journal windows: View->Terminal->Journal
after a few minutes you see there if your mail server is correct and an email can be sent.

4) if you get an error here, you can´t send messages within your mql code.

Remark: if you have to enter a different port it looks like this: yoursmtpserver. com:465

I hope this gives you an idea where to start.

br
fari


avatar
2
Trading2Retire 2007.09.01 22:12 

Is there any free non-SSL SMTP server out there that we can describe to?

I have accounts with google, yahoo, hotmail, godaddy, but none of them works. I think they are all Secure SMPT server.

Thanks.

fari wrote:
Hi Marshall,

I had also big troubles sending emails,
I learned, that SSL connections for SMPT might not work.

I tried several smtp server, finally one worked.

My debugging process:
1) go to Tools->Options->eMail
2) Enter a SMTP server and press the Test button.
3) Open the terminal journal windows: View->Terminal->Journal
after a few minutes you see there if your mail server is correct and an email can be sent.

4) if you get an error here, you can´t send messages within your mql code.

Remark: if you have to enter a different port it looks like this: yoursmtpserver. com:465

I hope this gives you an idea where to start.

br
fari



avatar
71
brspMA 2007.12.21 22:42 
Hi Guys,

So is not possible to use the SMTP from Google's servers, right? and if that is possible, could anyone kindly let me know how.

So far, I've tried smtp.gmail.com:587 , with my User Name and Password, but with no success.

thanks a lot,

avatar
30
alpha430 2008.02.11 02:08 

I know this was posted in April but could you tell us the name of the SMTP server that worked?


fari wrote:
Hi Marshall,

I had also big troubles sending emails,
I learned, that SSL connections for SMPT might not work.

I tried several smtp server, finally one worked.

My debugging process:
1) go to Tools->Options->eMail
2) Enter a SMTP server and press the Test button.
3) Open the terminal journal windows: View->Terminal->Journal
after a few minutes you see there if your mail server is correct and an email can be sent.

4) if you get an error here, you can´t send messages within your mql code.

Remark: if you have to enter a different port it looks like this: yoursmtpserver. com:465

I hope this gives you an idea where to start.

br
fari


Back to topics list  

To add comments, please log in or register