我被困在SharePoint 2013中的SpemailEventReceiver。

此我的代码:

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);

    }
}
.

上面的代码在VS 2013和2012中产生错误。

任何建议?帮助我

有帮助吗?

解决方案

Are you running solution in sandbox type solution?

If so, try full trust type.

其他提示

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

许可以下: CC-BY-SA归因
scroll top