I create a cmd that allows me to retrieve log in HTML email mailing them go.
There are several html files, so I wanted to compress all files with the 7Z then I send email with BLAT.
Sending works fine, but I can not unzip the file compress, 7Z an error: Can not open the archive.
Here is my cmd to send:
SET subj=-s "Log HTML"
SET msg=Ci-joint les rapports de supervisions
7z.exe a -tzip -mm=Deflate -mx7 -md=32k -mfb=64 -mpass=3 -mem=AES256 "Log_HTML.7z" "*.html"
::::::::::::::::: Now we run Blat! :::::::::::::::::
blat %0 -to %eMail% -f %expediteur% %subj% -attacht "Log_HTML.7z"
::::::::::: A quick message to the screen :::::::::::
ECHO ErrorLevel returned from Blat == %ERRORLEVEL% echo.
COPY "Log_HTML.7z" "SAV_LOG\%datetimef%.7z" /V /Y
What is the command to decompress?
you use -tzip but you name file with Log_HTML.7z
you do not need -mm=Deflate because Deflate is default for Zip
you do not need -md=32k because that is for -mm=BZip2
where is the -pPASSWORD switch for -mem=AES256?
7z a -mx7 -mfb=64 -mpass=3 -mem=AES256 -pPASSWORD "Log_HTML.zip" "*.html"
7z e -pPASSWORD "Log_HTML.zip"
you want to attach a binary file: -attach "Log_HTML.zip"; -attacht is for a Text file
%msg% is not in blat command line
what is purpose of %0?
blat -body "%msg" -to %eMail% -f %expediteur% %subj% -attach "Log_HTML.7z"
you may want to change SET subj=-s "Log HTML" to SET subj=Log HTML
(more consistent with other variables and blat command line parameters)
blat -body "%msg" -to %eMail% -f %expediteur% -s "%subj%" -attach "Log_HTML.7z"
Thank you for responding so quickly!
Actually, it works better with the right parameters!
Thank you !!!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.