I want to Add a custom Action or link as "Email to" in the EditControlBlock or the Context menu for custom list that i have created as shown in the Picture below.

This "Email to" button should send the list item as an email intended to a specific person. Every new item entry in the list will be also having attachments. I want to send the item with the body or description in the list with attachments linked with that item to some external person who cannot access the list as he will not be an employee and will not have permissions for the Intranet SharePoint site.

So basically the item to be sent in the email should have Title, Body, and the Attachments if any like a PDF or PPT or DOC or XLS file or any other documents attached. It should not send the link of the particular item in the email to the user as the user will not have any permissions for the Intranet site.

Could you please tell me how this can be achieved using JavaScript as i want it only for a particular list in the site collection and not for all site collections.

I am very much new to SharePoint so please it would be really helpful if anyone could share some custom code in JavaScript.

enter image description here

1 Answer 1


This can be achieved by creating a CustomAction. The CustomAction will create an ECB menu. On click of the menu a page (usually a layouts page) will be called. The CustomAction will pass the current list and list item ID to the page. The page will contain code to read the passed information and send email with attachment. An ECB menu example:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction RegistrationType="ContentType" RegistrationId="0x01200032C6A02524ED43F5AD242743898508D800EAD428598B934BA88023591EFDAFF1A2006226422850DB44FE8E4D61D2F82B1193" Location="EditControlBlock" Sequence="106" Title="Manage Client Logo File" ImageUrl="/_layouts/images/view.gif" Rights="EditListItems,AddListItems,DeleteListItems">
    <UrlAction Url="~site/_layouts/ClientLogoManagement.aspx?ItemUrl={ItemUrl}&amp;ListId={ListId}"/>
  • Thank you Nadeem for your answer. I think you mean to say that i should create a custom new solution in visual studio and then deploy it on the site, but as i said i am very much new to SharePoint i want to know how can we do it using javascript because creating a new solution is not possible nor do i want to go with custom code development. Please let me know another solution. You help is greatly appreciated. Thank you Dec 1, 2014 at 12:06
  • IMO there is no way to send emails using Javascript. Dec 1, 2014 at 12:26
  • Nadeem's answer is the best practice to implement new item in ECB. Any deviation from this answer, such as using JQuery selectors to add menu item dynamically in $(document).ready(), will result in unsupported scenario (for example when your farm gets a new patch). Dec 1, 2014 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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