2

I'm stuck in use of SPEmailEventReceiver in sharepoint 2013.

this my code:

public class EREmail : SPEmailEventReceiver // this error because namespace can't found
{
    public override void EmailReceived(SPList list, SPEmailMessage emailMessage, String receiverData) // this error because namespace SPEmailMessage can't found
    {
        base.EmailReceived(list, emailMessage, receiverData);

    }
}

the above code produces error in both VS 2013 and VS 2012.

Any suggestion? help me

0

Are you running solution in sandbox type solution?

If so, try full trust type.

0

Have you added both the using directives mentioned in the MSDN documentation?

This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint and Microsoft.SharePoint.Utilities namespaces.

It seems to not be enough to use Microsoft.SharePoint, you also need Microsoft.SharePoint.Utilities

  • yes. i have add microsoft.sharepoint and microsoft.sharepoint.utilities namespaces. but still error. there is SPEmailEventReceiver in sharepoint 2013? in my solution sp2013. i'm can't found SPEmailEventReceiver in sharepoint on object browser. in my solution sp2010. i found SPEmailEventReceiver on object browser. – user23495 Feb 7 '14 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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