I'm trying to send email notification using TI process. With the help of this forum, I'm able to do so. However, the required file is not getting attached. I need your assistance in helping me resolve this issue. Thanks a lot for your time and efforts.
Prolog : I have the code to fetch for latest log file -
Code: Select all
Lastfile = '';
s_TimeStamp = TimSt (Now, '\Y\m\d');
logfile = WildcardFileSearch( 'E:\Program Files\Cognos TM1\DataServers\TM1Data\ForDemo_Log\TM1ProcessError_'|s_TimeStamp|'*.log', lastfile);
WHILE ( logfile @<> '' );
Lastfile = logfile;
logfile = WildcardFileSearch( 'E:\Program Files\Cognos TM1\DataServers\TM1Data\ForDemo_Log\TM1ProcessError_'|s_TimeStamp|'*.log', lastfile);
END;
pAttachFile = logfile;
Code: Select all
IF( pAttachFile @<> ' ' );
arguments = 'CScript "E:\Program Files\Cognos TM1\DataServers\TM1Data\ForDemo\sendMailOther.vbs" '|sSMTPSvr |' ' | sSender | ' "'|pRecipient|'" "'|pSubject|'" "'
| sFileName | '" "' | pAttachFile | '"';
ELSE;
arguments = 'CScript "E:\Program Files\Cognos TM1\DataServers\TM1Data\ForDemo\sendMailOther.vbs" '|sSMTPSvr |' ' | sSender | ' "'|pRecipient|'" "'|pSubject|'" "'
| sFileName | '" "' | pAttachFile | '"';
ENDIF;
EXECUTECOMMAND(arguments ,1);
Please advice as I have tried tweaking the code several times.
Thanks again and happy holidays!