Вопрос

Я застрял в использовании SpemaileventReceiver в SharePoint 2013.

Это мой код:

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 с атрибуция
Не связан с sharepoint.stackexchange
scroll top