Posts

Showing posts from December, 2011

Sharepoint 2010 - Email Event Receiver Issues

Image
The Email event receiver is not so simple to create and execute... I experienced some issues for the correct configuration. EmailReceived Method: wrong reference in Handle Email Receiver method created by VS When you create the email event receiver you see the method EmailReceived. In Visual Studio, see properties of event receiver and you see "handle email receiver" = false. If you set to true, VS creates method EmailReceiver with Microsoft.Sharepoint.SPEmailMessage insthead of Microsoft.Sharepoint.Utilities.SPEmailMessage. This cause error in build event receiver. I think is an issue/bug of Sharepoint 2010, but I did not found any documentation in MS. Solution : The event receiver work fine without set "handle" property to true. Leave this setting to false. Email Event Receiver: SPContext.Current is null Solution : use list.ParentWeb, from the list property of method EmailReceived. Email Event Receiver: if you have to process attachment of email If y...