Question

Je suis coincé dans l'utilisation de Spemaileventreceiver dans SharePoint 2013.

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

    }
}

Le code ci-dessus produit une erreur dans VS 2013 et VS 2012.

Toute suggestion?aidez-moi

Était-ce utile?

La solution

Are you running solution in sandbox type solution?

If so, try full trust type.

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top