PETER PHAM Posted May 13, 2021 Share Posted May 13, 2021 Hi all, Weve attempted to zip a file and sending it by EDAMAIL function. We can see that the file is created in the agent folder(compress.zip), however it cant be attached to the message due to the error message=EDAMAIL: FILE compress.zip NOT FOUND. I have no issues to send the file in other formats such as HTML,PDF, XLSX Does anyone know how to do it below are the code that I got from IBIs support. Solution: save the zip file in an app folder/path -SET &ECHO=ALL; -SET &WORKDIR = TRIM_(BOTH, ',TEMPPATH(80, A80)); APP FI OUT DISK OUT.XLSX -RUN TABLE FILE CAR SUM SALES ON TABLE HOLD AS OUT FORMAT EXL07 END -RUN !copy c:Program Files7-Zip7z.exe !7z.exe a D:ibiappscachecompress.zip out.xlsx ! DIR &WORKDIR.EVAL -MRNOEDIT EX EDAMAIL to=ereport,fromaddr=webfocus@noreply-.com,toaddr=email,subject=test,flags=a,filetype=DEFAULTB,filename=compress.zip,message=Please see attached file Thank you, Pku Link to comment Share on other sites More sharing options...
David Beagan Posted May 14, 2021 Share Posted May 14, 2021 I tested in 8.2.06 and found that the file had to either be on the App Path or the app folder name indicated on the edamail command like this: ... ,filename=appfolder/file.ext Nothing else seemed to work. I thought that it used be able to find the file in edatemp. Link to comment Share on other sites More sharing options...
PETER PHAM Posted May 14, 2021 Author Share Posted May 14, 2021 Thanks, David, It works. Per your suggestion, I saved the zipped file in the appscache folder and the file was able to send as attachment. Working code: -SET &ECHO=ALL; TABLE FILE CAR SUM SALES ON TABLE HOLD AS OUT FORMAT EXL07 END -RUN !c:Program Files7-Zip7z.exe a D:ibiappscachecompress.zip out.xlsx -MRNOEDIT EX EDAMAIL to=ereport,fromaddr=webfocus@noreply-.com,toaddr=email,subject=test,flags=a,filetype=DEFAULTB,filename=compress.zip,message=Please see attached file Thank you, Pku Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now