Azure Serverless Computing Cookbook
上QQ阅读APP看书,第一时间看更新

Implementing email logging in Azure Blob Storage

Most of the business applications of automated emails are likely to involve sending emails containing notifications, alerts, and so on, to the end user. At times, users might complain that they haven't received any email, even though we don't see any error in the application while sending such notification alerts.

There might be multiple reasons why users might not have received the email. Each of the email service providers has different spam filters that might block the emails from the end user's inbox. But these emails might have some important information that the users might need. It makes sense to store the email content of all of the emails that are sent to the end users, so that we can retrieve the data at a later stage, for troubleshooting any unforeseen issues.

In this recipe, you will learn how to create a new email log file with the .log extension for each new registration. This log file can be used as a redundancy for the data stored in the Table storage. You will also learn how to store the email log files as a Blob in a storage container, alongside the data entered by the end user during registration.