views:

119

answers:

2

Hell guys,

I'm coding in csharp to send an email which contains a .zip file (has htmls and css inside). When I check the mail recieved, In fact, instead of the .zip file, the attachment becomes a txt file and has:

FILE QUARANTINED

The original contents of this file have been replaced with
this message because of its characteristics.
File name: 'xxxxxxx_Result.zip'
Virus name: 'Large uncompressed size'

The exchange server has blocked the zip file..I'm using CDO to create and send the email.

I tried using the code to send a mail with a zip file generated by WINZIP, there was no problem, then I tried using outlook to send a mail with the zip file generated by my code(I use sharpziplib library), the problem occured...

How can I do to send the attachment correctly? Many thanks in advance!

Allen

+1  A: 

Looks like your mail server or spam service have removed your attachement and replaced it with the txt file, it sounds like your code is fine and you need to speak to an admin regarding the mail filters and send size quotas!

OneSHOT
+1  A: 

I encounter similar problems sending email on our network. I've found that using an alternate compression format, such as 7-zip (.7z), is adequate to get my content through the filters. This could resolve the issue if the block is not due strictly to size.

kbrimington
Ok, I'll try this, thanks for the answer!
That will be due to the fact that most anti virus packages and mail servers now have built in zip functionality which allows them to open the file and scan the contents, the .7z format wont be recognised. Usually you can avoid this by renaming the extension to something else e.g. file.zi_ but this will require it to be renamed back on the other end for it to be recognised by extraction apps. Alot of the time they can be removed due to the fact they contain an exe file or vbs file or something similar.
OneSHOT
@OneSHOT: That is correct. Where I work, 7-zip is part of every desktop image. I've found it more convenient to format as .7z than to explain to users what they must do to render a renamed zip usable.
kbrimington