Forum Discussion
Architecture question - Email send functionality - Pattern
Hi fabricpribeiro,
The graph approach is the one I would choose, though I have seen quite a few posts on here of users not able to get it working. I have yet to attempt to send emails through graph myself.
Provided you get the API permissions all sorted out, I would recommend wrapping this in a UDF instead of in a notebook, or perhaps multiple UDFs depending on what types of emails you will be sending.
That way you have a single call to send an email, wither it's called from a pipeline or a notebook or some other item type down the road, it all calls the UDF.
You can also set up the UDF to have standard templates and standardize the email subject and descriptive information about the type of email. For example, you could have a warning UDF that includes details like "this should be investigated, but this did not prevent ETL from moving on" and you can have an error UDF that screams a little louder with something like "drop everything data is no longer flowing to the business"