English 中文(简体)
Sharepoint 2010 Email Event Receiver not firing?
原标题:

I have two event recievers setup on a list in 2010.

The first is a ItemAdded reciever that works every time:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="10000">
      <Receiver>
        <Name>ListItemReceiverItemAdding</Name>
        <Type>ItemAdding</Type>
        <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
        <Class>SSW.TipDontRant.Sharepoint.ListItemReceiver</Class>
        <SequenceNumber>10000</SequenceNumber>
      </Receiver>
  </Receivers>
</Elements>

The second is an Email event reciever that I have only preiodicaly got to work.. In the 30-40 attempts to debug the applicaiton I have only had it work in 2 cases.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Receivers ListTemplateId="10000">
      <Receiver>
        <Name>EmailReceiverEmailReceived</Name>
        <Type>EmailReceived</Type>
        <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
        <Class>SSW.TipDontRant.Sharepoint.EmailReceiver</Class>
        <SequenceNumber>10000</SequenceNumber>
      </Receiver>
  </Receivers>
</Elements>

I have attached to the OWSTimer and the ListTemplateId is indeed correct.

On checking the log as sugested I found the follwoing error:

12/11/2009 17:12:54.01  OWSTIMER.EXE (0x2314)                       0x046C  SharePoint Foundation           Monitoring                      nasq    Medium      Entering monitored scope (Timer Job job-email-delivery) 7b525bbb-0972-4115-97b1-19b1d94ff8c5
12/11/2009 17:12:54.03  OWSTIMER.EXE (0x2314)                       0x046C  SharePoint Foundation           E-Mail                          6873    Warning     An error occurred while processing the incoming e-mail file C:inetpubmailrootDrop24c6872e01ca7a8500000003.eml. The error was: Object reference not set to an instance of an object..    7b525bbb-0972-4115-97b1-19b1d94ff8c5
12/11/2009 17:12:54.03  OWSTIMER.EXE (0x2314)                       0x046C  SharePoint Foundation           E-Mail                          6871    Information The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.0190038.  The service processed 1 message(s) in total.  Errors occurred processing 1 message(s): Message ID: <B05256D324B3D540853A95FF2AD9B257801F931C81@mooncalf>    7b525bbb-0972-4115-97b1-19b1d94ff8c5
12/11/2009 17:12:54.03  OWSTIMER.EXE (0x2314)                       0x046C  SharePoint Foundation           Monitoring                      b4ly    Medium      Leaving Monitored Scope (Timer Job job-email-delivery). Execution Time=23.4762559268986 7b525bbb-0972-4115-97b1-19b1d94ff8c5

Its a little dificult to read here, but the important bit I think is:

An error occurred while processing the incoming e-mail file C:inetpubmailrootDrop24c6872e01ca7a8500000003.eml. The error was: Object reference not set to an instance of an object.. 7b525bbb-0972-4115-97b1-19b1d94ff8c5

Which does not tell me much! I do not think that it an error with my code, as it would throw within Visual Studio. I can confirm that emails sent to a document library work correctly as well.

  1. Has anyone else had these problems?
  2. Has anyone managed to get this to work consitantly?

[UPDATE] I left my code over the weekend, did not touch it at all, and now it is working! This seams to be very flacky on Sharepoints part.

So, I now have the line of my code that is failing (note that I did not get this far before) and it is on a reference to an external assembly for which I have opened another question Sharepoint 2010 Project package: Cannot add a new project output assembly to the package

最佳回答

It looks like this is a bug either in VS2010 Beta 2 or in Sharepoint 2010 beta.

To solve the imediate problem you need to delete the site, deactivate and remove the solution and then reboot your enviroment.

This only happens when you make structural changes to your lists and Event Recieves and only seams to affect the Email Event Reciever...

问题回答

暂无回答




相关问题
SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

UI automated testing within SharePoint

I m looking for automated Functional Testing tools that can manipulate SharePoint sites, libraries, and documents thought the web interface. It needs to be extensible enough to handle any custom ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...

热门标签