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

Very simple set-up:

Visual Studio --> Add New Item --> List Definition. Type: Document Library. Besides that - no changes. Deploy.

Result:
enter image description here

As you can see: No "configure incoming e-mail settings" link.

When I create a document library the regular way (e.g. Site Actions --> New Document Library) I get the wanted result:
enter image description here

How to I get the "Incoming e-mail settings" link on a document library deployed via Visual Studio?


EDIT (thanks to Falak):
The solution is to add (even if only a dummy) SPEmailEventreceiver to the list. So if you do this:

public class MyMailEventReceiver : SPEmailEventReceiver
{
    public override void EmailReceived(SPList list, SPEmailMessage emailMessage, string receiverData)
    {
        base.EmailReceived(list, emailMessage, receiverData);
    }
}

and the elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="xyz"> <!-- add the correct template id here -->
      <Receiver>
        <Name>MyMailEventReceiver</Name>
        <Type>EmailReceived</Type>
        <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
        <Class>myAssembly.MyMailEventReceiver</Class>
        <SequenceNumber>10000</SequenceNumber>
      </Receiver>
  </Receivers>
</Elements>

Voilá, I have the incoming e-mail settings link in the document library settings.

share|improve this question
add comment

1 Answer 1

up vote 10 down vote accepted

SharePoint only shows Incoming Email settings link for OOTB lists of type Announcements, Event, Document Library, Picture Library, XML Form, Discussion Board, Posts.

So, if you create a custom list, you need to create a custom email event handler and attach to your list and then Incoming Email settings link will be available.

More info: http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/f8d57aba-2a0e-41a1-a280-2e022f5604e3

share|improve this answer
    
Great documentation on the MS side... I added the solution above for future reference. –  Dennis G May 21 '12 at 7:05
add comment

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.