Automatic report with SET_HTML_REPORT

Discuss, post your questions about TWSLink here.

Users who just registered, please write an email to
forum@trade-commander.de
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
pietrop
Posts: 11
Joined: Tue Mar 20, 2018 1:05 pm

Automatic report with SET_HTML_REPORT

Post by pietrop »

Hello all,

I'm trying to setup an automatic report through the API but I don't seem to receive it, neither by FTP nor Email.
Is there any way to debug the process?
I'm using the following code:

Code: Select all

void testIbReport() {
  int res = 0;
  
  res = CREATE_FTP_CFG("myftp.cfg","192.168.12.113",21,"ftpuser","mypassword","ibreport",0,1);
  Print("CREATE_FTP_CFG returned: ", res );

  res = CREATE_MAIL_CFG("mymail.cfg","smtp.gmail.com",
            465, // 587=TLS, 465=SSL
            2, // 1=TLS, 2=SSL
            "developer.ags",
            "mypassword",
            "","developer.ags@gmail.com","developer.ags@gmail.com");
  Print("CREATE_MAIL_CFG returned: ", res );

  res = SET_HTML_REPORT(1,"IB-report.html","myftp.cfg","mymail.cfg",1);
  Print("SET_HTML_REPORT returned: ", res );
}
MT logs:

Code: Select all

2018.04.04 17:18:04.502	ZetaEA (GBPCHF,M1)	CREATE_FTP_CFG returned: 1
2018.04.04 17:18:04.503	ZetaEA (GBPCHF,M1)	CREATE_MAIL_CFG returned: 1
2018.04.04 17:18:04.503	ZetaEA (GBPCHF,M1)	SET_HTML_REPORT returned: 0
TWSLink logs:

Code: Select all

20180404 17:13:50:366;       307;note;tcExpFunc;CREATE_FTP_CFG;-m
20180404 17:13:50:367;       307;note;tcExpFunc;CREATE_FTP_CFG;ret=1
20180404 17:13:50:367;       307;note;tcExpFunc;CREATE_MAIL_CFG;-m -587 -1
20180404 17:13:50:367;       307;note;tcExpFunc;CREATE_MAIL_CFG;ret=1
20180404 17:13:50:367;       307;note;tcExpFunc;SET_HTML_REPORT;-1 -I -m -m -1
20180404 17:13:50:367;       307;note;tcExpFunc;SET_HTML_REPORT;ret=0

Post Reply