SharePoint feature for sending e-mails from document libraries

System requirements

Server
SharePoint 2010 must be installed. There are no special requirements for the edition of SharePoint.

Client
Following requirements must be fulfilled on the Client in order to use the feature:
1. Outlook is installed on the computer and the computer is located in the same domain as the server.
2. This feature is to be used with Internet Explorer only, as ActiveX technology is not supported by other web browsers.
3. In the security settings of Internet Explorer must be activated following settings: “Initialize and script ActiveX controls not marked as safe for scripting” and "Automatic logon with current user name and password".

For activation of settings, following steps must be carried out:
3.1. Click on "Tools" in the task menu of Internet Explorer
3.2. Click on “Internet Options” from dropdown-menu
3.3. In the internet options click tab ”Security”
3.4. Choose the zone ”Trusted sites”
3.5. Click the button “Sites” and insert your SharePoint-Site to “Trusted sites”.
3.6. Click the button “Custom level”
3.6.1 Activate the setting “Initialize and script ActiveX controls not marked as safe for scripting”
3.6.2 Activate the setting “Automatic logon with current user name and password”

Installation

The installation can be divided in to the following steps:
1. Adding “Communardo.SendSharePointDocumentsAsEmailAttachment.wsp” solution to the SharePoint Farm solutions. There is no possibility to do it by means of user interface. Thus command line tool “stsadm” has to be used. Following command should be run under administrative rights on the server (before that save the file “Communardo.SendSharePointDocumentsAsEmailAttachment.wsp” in any directory, for example C:\Communardo).
(Figure 1)


Figure 1.

2. Open SharePoint 2010 Central Administration and click the link “System Settings” and then the link “Manage farm solutions” (Figure 2).



Figure 2.

3. In the list of all SharePoint solutions click “Communardo.SendSharePointDocumentsAsEmailAttachment.wsp” and then “Deploy Solution“ (Figure 3)



Figure 3.

Activation

If the feature is not activated you can activate it by executing following steps:
Open Internet Explorer and open your SharePoint root site. Log in as administrator. Click on “Site Actions” and in the context menu on “Site Settings”. On the page “Site Actions” click on the link “Site collection features". On the then following page search for the feature “Communardo Send documents as attachments” and click on the button “Activate”. The feature is now activated and can be used.

Application

Sending documents via Ribbon Bar

When the feature “Communardo Send documents as attachments” is active, there will be added a button “Send documents as e-mail” to the section “Share & Track” in the ribbon of all document libraries (Figure 4). This button will be active only if at least one document is selected. After clicking on “Send documents as email” the dialog “New Mail-Dialog” of Outlook will be opened and the selected documents will be automatically added as attachments.



Figure 4.

Sending single documents as e-mail via context menu
There is an additional possibility to send a single document as an e-mail via context menu. For this purpose, there is an entry “As e-mail attachment” in the context menu (Figure 5).


Figure 5.

Last edited Jun 17, 2011 at 7:40 AM by Communardo, version 32

Comments

JeanJacquesJarre Apr 2, 2013 at 9:37 AM 
Thanks ! I added a fr-FR resource file in order for the solution to display correctly on a french SharePoint. Everything works fine.

Communardo Apr 2, 2013 at 9:23 AM 
As there has been a question/requirement for displaying texts in French last week:

You could do this on your own. Simply add a fr-FR resource file.
(In order to achieve this you may copy the "SendDocumentAsAttachment.en-US.resx" file in the folder "yourserver\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources" and rename the copied file to "SendDocumentAsAttachment.fr-FR.resx". Afterwards you can replace the English entries in the file by French entries.)

georg0815 Jan 21, 2013 at 9:05 AM 
Hi,
I have the same problem as it had charlesdg: "I put “Initialize and script ActiveX controls not marked as safe for scripting” on "enable" and set "Automatic logon with current user name and password", but I still have the error message "error: the operation failed...." I have SharePoint Foundation 2010, IE9 and" Outlook 2010 32 bits. I addition I can say that the Outlook computer and the sharepoint server both are in the same domain.

Can you help ?
Thanks

iwanvdw Nov 15, 2012 at 8:37 AM 
problem solved, turned out that our document libraries have non default ID's after modification of elements.xml the ribbon button showed up on our custom libraries

iwanvdw Nov 13, 2012 at 7:20 AM 
After a successful installation of this package the quick menu 'As e-mail attachment' is displayed on all Libraries which seems good to me.
The ribbon button seems only to be displayed on document libraries, is this true?
Somehow we have document libraries with ‘/Lists/’ in the url path:
<site url>/<department>/Lists/<document library> the ribbon button is not displayed, how do we get the button to display in those document libraries?

Communardo May 16, 2012 at 7:47 AM 
@pgartzia Please describe the problem a bit more in detail: is the other office in the same domain? What is the error message in detail? For the moment just following information: The feature works only if the computer where Outlook is installed is located in the same domain as the server. Thats because Outlook automatically authenticates at SharePoint by using the current Windows account.

pgartzia May 9, 2012 at 10:44 AM 
If I have a domain-joined computer, but I'm in another office, does it work? because I do not work, I get the error always

Communardo Mar 2, 2012 at 10:39 AM 
Hi charlesdg, are the client computer (with outlook instralled) and the SharePoint server located in the same domain?

charlesdg Mar 1, 2012 at 4:08 PM 
Hi, I put “Initialize and script ActiveX controls not marked as safe for scripting” on "enable" and set "Automatic logon with current user name and password", but I still have the error message "error: the operation failed...." I have SharePoint Foundation 2010, IE9 and Outlook 2010 64 bits...
Any idea?

Thanks !

Communardo Nov 15, 2011 at 6:35 AM 
I think you could establish a trust relationship between the two domains.

heguangm Nov 14, 2011 at 7:24 PM 
How can we make it work across domain? In my case, my sharepoint is installed in another domain B; people logged into their machine with account from domain A.

Is this related to IE configuration or the Sharepoint client js limits?

Thanks,

Guangming

DPasternak Nov 4, 2011 at 8:33 AM 
Thanks, but I was not referring to your application, when asked about the functionality:) I asked whether there is such an application:)
Thank you very much for the fact that your application can do, and extends the functional portal, helped me so much application, but the PRI bosses now want more:)

Communardo Nov 2, 2011 at 10:00 AM 
No, automatic sending of emails isn't in the scope of this feature. This isn't possible either without configuring and saving a list of email receivers at least. Also this wouldn't work by using custom menus but rather by implementing an event handler (for item added, in your case).
Of course this would be possible from technical point of view. But as I've said, it isn't in the scope of our feature. But as the source code is available please feel free to use the code and extend it by yourself!

DPasternak Oct 31, 2011 at 6:26 AM 
I apologize, wanted to say:
as soon as documents are added to the document library, immediately sent an email with an attachment of that document, for all people who receive notification

Communardo Oct 28, 2011 at 10:43 AM 
Sorry but I didn't understand what you mean by "messages automatically sent as soon as they are added". Please explain...

DPasternak Oct 28, 2011 at 5:26 AM 
users liked the functionality, but now they want those messages automatically sent as soon as they are added. I apologize for my indiscretion, tell me if there is such a component.

DPasternak Oct 27, 2011 at 1:26 PM 
Ok, everything works:) but it works on another machine, I'll sort out what is wrong with the settings IE.
Thank you for your help, your information was helpful! Thank you again for your component, which helped solve the task.

Communardo Oct 26, 2011 at 11:21 AM 
Did you also activate the setting "Automatic logon with current user name and password" in the security settings of Internet Explorer?

DPasternak Oct 26, 2011 at 11:05 AM 
this is great, the function became available in the user interface:) Thanks!
Now there is a problem with clicking on it when trying to send a document, there is a message in the far top corner, "outlook loading" and nothing happens. Pressing function adds another message "outlook loading" and again there is no initialization.
The site is in Intranet zone and "Initialize and script ActiveX controls not marked as safe for scripting" is enabled
Using IE 9.0.2 and Outlook 2010 SP1

Communardo Oct 26, 2011 at 10:22 AM 
To tell the truth I don't know why the feature doesn't show up in your list of features in the web site settings. Are you sure you did deploy the solution in central administration and it showed up correctly as "deployed" afterwards? But I think so, because the folders and files are correctly put in the "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES" folder. So I suggest to activate the feature manually via stsadm. For this you have to open a console window (cmd.exe), change to folder "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN" and execute the following command: "stsadm -o activatefeature -name Communardo.SendDocumentAsAttachment -url <your sharepoint portal url>". It should be said something like "feature activated" afterwards. Please let me know if this worked.

DPasternak Oct 25, 2011 at 2:48 PM 
I have the following files:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment\Feature.xml
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment\Resources\Resources.de-DE.resx
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment\Resources\Resources.en-US.resx
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment\Resources\Resources.resx
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment\SendEmailAction\Elements.xml
but I have no button activation of solutions in "Site Settings" - "Manage farm solutions", and I can not see it in the list

Communardo Oct 25, 2011 at 8:58 AM 
@Dpasternak Please have a look at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment" - there should be 2 folders "Resources" and "SendEmailAction" and 1 file "Feature.xml". In the folder "Resources" should be 3 resource files "Resources.de-DE.resx", "Resources.en-US.resx", "Resources.resx". in the folder "SendEmailAction" should be 1 file "Elements.xml". Please check whether all files and folders are there.
Don't worry about the folder "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources" - there don't ought to be any files regarding this feature.

DPasternak Oct 25, 2011 at 6:40 AM 
Yes, the directory exists:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Communardo.SendDocumentAsAttachment
it is the directory "Resources" where the files:
Resources.de-DE.resx
Resources.en-US.resx
Resources.resx

what I can do that would be able to activate a component? Thanks in advance.

Communardo Oct 24, 2011 at 1:37 PM 
@DPasternak This doesn't seem to be a problem regarding the resource files (whereat this problem already has been fixed in release 1.1). Please have a look at the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES whether there exists the folder "Communardo.SendDocumentAsAttachment". If not there is a problem regrading solution deployment.

DPasternak Oct 24, 2011 at 7:16 AM 
I want to thank you for the very helpful application.
But I have a problem with installing the component on the Russian version of sharepoint 2010 SP1, I can not activate, it does not appear in the application list site (In the section "Manage farm solutions"), but status of «Communardo.SendSharePointDocumentsAsEmailAttachment» - deployed.

I read the comments and the decision of this problem, by renaming the fileSendDocumentAsAttachment.en-US.resh, But in the directory, C: \ Program Files \ Common Files \ Microsoft Shared \ Web Server Extensions \ 14 \Resourtses no such file, the following is a list of all files in a directory.

I very much hope for your help. Thanks in advance.

kanal5 May 3, 2011 at 12:06 PM 
@Communardo. Thanks for your help. I wasn't logged in as Farmadmin. After doing so, the Site Collection Feature appears and I could activate it.
It's very helpful.

MonsterCode Apr 29, 2011 at 2:18 PM 
Thanks sooo much for this, this is very helpful ! I added a fr-FR resource file in order for the solution to display correctly on a french SharePoint. Everything works fine.

Communardo Apr 28, 2011 at 10:24 AM 
@Jamiboy: We are glad to provide release 1.1 where this issue is fixed. Now a default language has been introduced which will be used in case of a not supported language. The default language is English.

Communardo Apr 26, 2011 at 7:44 PM 
@Jamiboy: Yes, the Finish SharePoint could be the problem. We will look this up and keep you informed.
Meanwhile you could try the following: copy the "SendDocumentAsAttachment.en-US.resx" file in the folder "yourserver\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources" and rename the copied file to "SendDocumentAsAttachment.fi-FI.resx". If the Finish SharePoint is causing the problem indeed, afterwards you should hopefully see the English resource entries (and could replace them by Finish entries in the "SendDocumentAsAttachment.fi-FI.resx").

Communardo Apr 26, 2011 at 7:30 PM 
@kanal5 We tested the solution on a German Sharepoint Foundation successful. Are you sure you are looking for the feature in the site collection features (-->Site Collection Administration--> Site Collection Features, or, in German: Websitesammlungsverwaltung-->Websitesammlungsfeatures)? If so, then please have a look in the folder "yourserver\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES" whether there exists a folder "SendDocuments_SendDocumentAsAttachment" and in the folder a file named "feature.xml". Keep us informed about your results, please!

kanal5 Apr 21, 2011 at 9:53 AM 
Hello.
Today I tried to install your solution. But I can't activate it, because it doesn't appears in the list. The property "Contains Global Assembly" stands to false. I'm using a German Sharepoint Foundation. What could it be?

Jamiboy Apr 4, 2011 at 7:55 AM 
Hey again!
I looked up "myserver\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources" and those two files were there and everything was fine. I also added the necessary files into BIN folder in correct folders. The problem didn't go way. I was wondering if the languages have something to do with it. My Sharepoint is in Finnish and was wondering if the sharepoint is looking for "SendDocumentAsAttachment.fi-FI.resx"

I'll keep on trying. Get back to you.

Jamiboy Apr 4, 2011 at 7:30 AM 
Thanks for the reply. I'll see if this solves it and get back to you.

Communardo Mar 30, 2011 at 7:53 AM 
Hello Jamiboy, I looked up once more all files (including unzipping the *.wsp file) and all seems to be ok. The resource files are contained in the wsp solution, too. Furthermore I installed the solution on a "fresh" SharePoint Server 2010 and it was working well. So I can only guess that there might be a problem regarding the resource files/folder on your SharePoint Server? Please have a look at the folder "yourserver\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources". There should be the 2 files "SendDocumentAsAttachment.en-US.resx" and "SendDocumentAsAttachment.de-DE.resx" and "normal" users.should have at least read permission. Please let me know if you have any new information!

Communardo Mar 28, 2011 at 7:14 PM 
It looks like a problem regarding the resource files. As if the term "SendDocuments" couldn't be found in the resource file "SendDocumentAsAttachment". I analyzed the resource files in the source code folder and they seems to be ok. But in the "bin" folder (containing the *.wsp solution package) the resource files are not contained. Maybe you could help yourself by a quick hack: copy the resource files (and also the image files) from the source code folder to the appropriate folder under "bin" and then install the feature ones more - I think this should solve the problem.
Of course we will deal with the problem, too, and keep you posted if a new version is ready for download.

Jamiboy Mar 21, 2011 at 12:52 PM 
I did all the steps above and got the button working with one minor error. The button doesn't show up like in Figure 4. instead there is a smaller letter image and the text which should be "Documents as e-mail attachments" is actually "$Resources:SendDocumentAsAttachment,SendDocuments;". The error is only visual, the button does work fine and does the trick, but that title is confusing and I need to change that. Any ideas how?

I checked my internet options for ActiveX and I allowed everything. Still the same issue.

Please help. Thanks in advance!