then added to the ItemAdding the following line of code:
SPUtility.SendEmail(SPContext.Current.Web, false, false,
"m...@domain.xxx", "Test event receiver email", "This message is sent as a
result of the event ItemAdding firing on the survey");
Built and deployed the solution from the menu. I was expecting this to work,
but it's not firing, and in the logs I get:
Error loading and running event receiver
ISFeedbackSurvey.ISFeedbackSurveyEvtItemEventReceiver in ISFeedbackSurvey,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=97efffa28708eee2. Additional
information is below. : Object reference not set to an instance of an object.
and
Event manager error: Could not load file or assembly 'SurveyNotification,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=4884dab2ea11612f' or one of
its dependencies. The system cannot find the file specified.
I've checked the GAC, the dll is there, the SafeControls entry is in the
web.config...
What am I missing?
Funny enough, the coding in ItemDeleting is firing just fine.
properties.ErrorMessage = "Hitting ItemAdding event override...";
properties.Cancel = true;
it works just fine. Those errors are in fact thrown by SPUtility.SendEmail...
how do I go about using SPUtility? What else needs to be deployed with my
feature?