Mail sent without any attachment
Posted: Wed Dec 24, 2014 10:03 pm
Hi all,
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 -
Epilog: I have the required vb script in place that send across email -
When I run this process, email is sent but the file is not getting attached. However, if I hardcode the required file (with its location) it goes through.
Please advice as I have tried tweaking the code several times.
Thanks again and happy holidays!
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!