SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need the procedure to zipping all the files in the document library of sharepoint 2010 and email that zipped file using aspx and c# coding.

Can any have any idea about this concept....?

share|improve this question
up vote 1 down vote accepted

The solution for that request would be pretty simple.

This solution will be in 3 parts :

  1. Create a custom list ribbon element that will trigger the zip action
  2. The triggered action (a page or server side code) would zip the content of the list. For that, you could use the external library DotNetZip. You will produce an In-Memory stream that will be used in step 3.
  3. Send an email with the built-in System.Net.Mail in the .NET framework. The SPUtilities.SendEmail(...) can't be good, you can't send attachment from it...

There you go, that would be the easiest way of doing it! I did it for SP2007, and it's quite simple!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.