Wednesday, April 15, 2009

SPEmailEventReceiver not working?

I was working on the SPEmailEventReceiver attach to sharepoint list and faced the same issue that most of the people faced. Once you deploy the code to GAC and attach receiver code works fine. After that if you change the code and deploy the assembly event doesnt get fired.

The only problem here is that somehow sharepoint receiver handler keeps referencing old
assembly version and as a result doesnt fire the event.

Solution is to change a version number every time you deploy the dll to GAC. Remove the receiver and attach once again. This way sharepoint always refers to a new version of the dll
and event is fired all the time.


  1. Hi Prathakye,
    you no need to change the version number every time, you just have to restart the owstimer, n sharepoint will start taking the new dll codes

    Thanks & Regards,
    Vikash Sharma

  2. Like Vikash said, SPEmailEventReceiver runs in owstimer.exe process and this timer job is scheduled to run every minute. I have just blogged about this in my own blog since I had the same problem