Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.