Kit Kai's Tech Blog

Blog about SharePoint

This Blog

Syndication

Search

Tags

News



  • Want to be notified when new posts are available? Click the icon below for more information on how to subscribe.

    Blog Flux MapStats: Stats and Counter for Kit Kai's Tech Blog Subscribe to Kit Kai's Tech Blog

    Locations of visitors to this page Add to Technorati Favorites

Community

Email Notifications

Archives

Sharepoint / CMS Blogs

MVPs', Leads' & RDs' Blogs

Singapore Usergroups

Overseas Usergroups

About Me

Enabling Incoming Email Feature for other lists

SharePoint lists can now receive e-mail. Discussion Boards, Calendars, DocLibs, Announcements accept incoming mail. Discussion boards maintain e-mail threading and full html messages. Calendars process incoming iCals, DocLibs map attachments to documents. [Copied and paste from http://weblogs.asp.net/erobillard/archive/2005/09/14/425235.aspx. I'm lazy to create the different lists and see if it has incoming email support...]. Of course this blog post is not about what's available out of the box....

What happen if you need incoming email support for other kinds of list? In my work, it is common for me to create custom list definitions, but even if I create a list definition that is simliar to a parent list (e.g. CKS: Enhanced Wiki Edition), you lose the incoming email feature.

So, is that the compromise you need to make when you want to extend SharePoint functionality via custom list definition? Is SharePoint such a lame development platform! Obviously No!

What you need to do, is to create another kind of event receiver, known as Email Event Receiver. Attach this email event receiver to the list definition type using features, and the incoming email link will appear.

Just briefly, the steps you need to do are:

1. Create a class that inherits from SPEmailEventReceiver

2. Override EmailReceived method, and implement your own logic on how to process the email.

3. Create the xml that defines the event, specifying the ListTemplateId, and the type of event (EmailReceived) to attach this event receiver to (among other xml element you need to define)

4. Create the feature definition

5. Deploy!

And you will then notice that incoming email link will appear in the list settings.

Published Friday, December 28, 2007 11:55 AM by kitkai
Filed under:

Comments

# Enabling Incoming Email Feature for other lists@ Friday, December 28, 2007 1:00 PM

SharePoint lists can now receive e-mail. Discussion Boards, Calendars, DocLibs, Announcements accept