Plugins are some of the most powerful extensions Dynamics 365 offers. They allow you to execute a process before or after an entity's event, such as create, update, assign, and so forth.
In the previous recipe, we created a data access layer class that retrieves e-mails and updates entities. In this recipe, we will leverage this layer and convert the class into a plugin that retrieves e-mails associated with a specific account, closes the ones with no subject, and updates the start date of the rest to ten days from today's date.