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

Implementing email logging in the Blob storage

In most of the applications, you would have requirements of sending emails in the form of 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 in sending them to the end user's inbox. These emails might have some important information that the users might need. It makes sense to store the email content of all the emails that are sent to the end users, which could be used for retrieving the data at a later stage or for troubleshooting any unforeseen issues.

You will learn how to create a new email log file with the .log extension for each new registration. This log file could be used as a redundancy to the data stored in the Table storage.

In this recipe, you will learn how to store the email log files as a Blob in a storage container with the data inputted by the end user while getting registered.