It is possible to use existing Python or Scala libraries to send an email from a Databricks notebook (e.g. python's smtplib). The answer in this forum question does a good job explaining further: https://forums.databricks.com/questions/17785/databricks-sendgrid-integration.htm This answer also talks about the 'jobs' feature of Databricks, which might fit your use case (i.e. configuring email rules for notebook runs)
If you are in an Azure environment and able to use other tools, I suggest looking at how (1) Data Factory, (2) Logic Apps, or (3) Functions might be used in your scenario. There are examples out there on Databricks and Azure sites if you do some searching. As mentioned above, it is possible to send emails from Databricks itself, but this is not the intended design of the platform. Instead, other tools in the landscape are better used for sending e-mails. The high level architecture might be something like
- Data Factory job calls Databricks notebook
- Databricks notebook returns information for filtering (i.e. some flag, or other metadata)
- Data Factory job sends the email based on the output