Using publishing events to send a publish completion e-mail

Sitecore has no out-of-the-box provision to notify content authors when publishing gets completed or fails. Notifying users becomes very important when a longer publishing gets completed and, even more importantly, when it fails in order to remind them to publish it again.

In this recipe, you will learn how we can send e-mails to the publisher user on publishing completion using the publish:complete event. After this, you will be able to send e-mails after publishing fails or expires.

How to do it…

We will first create an event handler class that will extract all publishing parameters and send an e-mail with publishing details:

  1. In the SitecoreCookbook project, create a new SendEmail class ...

Get Sitecore Cookbook for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.