Saturday, May 15, 2010

Send To Email with Attachment

Sending emails with a Sharepoint document as an attachment is a commonly asked for feature in Sharepoint.
Although the mailto: link used to work with the attachment parameter, this has not been supported by Outlook for a long time. Why? because it would be too easy to attach viruses to emails that way. Outlook would have to download a file from the internet and add it to the message. The chance of malicious code injecting into the process is too risky as well as the chance to send infected files to friends and colleagues.

So what is the solution?

If you wish to extend the send to menu in SharePoint, you can create a feature with a custom action to add another link to the ECM (Context Menu) which opens up a custom application page which then allows the user to enter receiver, subject and body. The server then could send the email directly via the configured SMTP server.

But beware!
This should only be done in an intranet scenario where the sending user has been authenticated. Otherwise it could be abused for spamming purposes too easily

No comments: