Jump to content

Hi all, Weve attempted to zip a file and sending it by EDAM...


PETER PHAM

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...