I have an existing publishing site with content approval enabled and already implemented event receivers. Approvers are creating content and publishing directly. However, authors are creating content too, they only can submit for approval. I want to send an email when someone submits an item for approval. Sounds easy... But, the e-mail should not be sent if the item is published directly. When I debug ItemUpdated and check the properties.ListItem.ModerationInfo on both actions (Publishing and Submit for Approval) gets "Pending"; when Published the event ItemUpdated fires again and the status is Approved. How do I accomplish that only an email is sent when submitted for approval?
I tried with a custom list workflow created in SPDesigner, that works, but that is not deployable and is overkill. I just want to check that final state = Pending. Please help...
I've seen this: SharePoint - checking Content Approval change status in event receiver that is not enough...