Working first with the SPEmailEventReceiver ,I have created the one event receiver.

How can I debug the SPEmailEventReceiver?

Please provide the configuration details on the SPEmailEventReceiver and how to hit to the EmailReceived (debugging of the Event Receiver)

Below is the code snippet which I have created.

public class SRMMailProcessor : SPEmailEventReceiver
    public override void EmailReceived(SPList list, SPEmailMessage emailMessage, String receiverData)
        base.EmailReceived(list, emailMessage, receiverData);
  • The events run within the web service so you need to attach to w3wp.exe to debug. – TARUN Jul 24 '17 at 12:26
  • No Tarun we need to attach OWSTimer – Dinesh Talekar Jul 24 '17 at 18:25


Follow these steps

  1. Deploy your solution to SharePoint.

  2. Press Windows+R and run Services.msc, Restart SharePoint Timer Service

  3. Go back to visual studio attach process OWSTIMER.EXE and try sending mail to document library/list

NOTE: you will have to stop and start SharePoint Timer Service every time you deploy solution to SharePoint.

When you send email check the drop folder (C:\inetpub\mailroot\Drop) does the mail gets stuck there?

| improve this answer | |
  • Thanks Tarun But I am having one issue As I start debug, debugger came but, SPList getting null in the EmailRecieved method. Please Help – Dinesh Talekar Jul 27 '17 at 7:32

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.