SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to create a SPEmailEventReciever on an Email enabled library...The problem is that intellisense is not showing that class for me, so I am unable to inherit from it.

MSDN shows it in the Microsoft.SharePoint workflow namespace, so it should show up with all of the other classes (such as SPItemEventReciever, etc).

share|improve this question
Works ok for me. Are you creating your class from scratch or using the Visual Studio tools to Add new item > Event receiver > List Email Events etc – Paul Lucas Nov 11 '11 at 0:45
I just used the designer and selected List Email events...It auto-generated the class inheriting from SPEmailEventReceiver, except intellisense doesn't like the class name. It prevents me from building. – Tim Gabrhel Nov 11 '11 at 14:06

For intellisense, There might be some problem with your VS templates for SharePoint. Anyway, problem with intellisense will not stop you to inherit the class in code. Create a class like below :

    public class EventReceiver1 : SPEmailEventReceiver
       /// <summary>
       /// The list received an e-mail message.
       /// </summary>
       public override void EmailReceived(SPList list, SPEmailMessage emailMessage, String receiverData)
           base.EmailReceived(list, emailMessage, receiverData);


Ensure that you have reference for Microsoft.SharePoint.dll

share|improve this answer
up vote 0 down vote accepted

I deleted the project and re-added it. It worked fine this time.

I'm wondering if it was because I accidentally selected 'Sandboxed Solution' when initially creating the project.

share|improve this answer

Your Answer


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.