Email Notification System

The Email Notification System is a backend application that leverages Azure Communication Services to send dynamic and templated email notifications. This application is designed to facilitate the bulk sending of emails with personalized content based on user data. It utilizes a combination of Razor templating and Azure Table Storage to manage the email sending process and track the status of each sent email.

The system allows users to specify details such as the sender’s and recipient’s email addresses, subject lines, and content while automatically generating personalized messages based on input data. The application is efficient, scalable, and adaptable for various email notification scenarios, such as ticket confirmations or promotional messages.

Key Technologies

  1. Azure Communication Services: Used for sending emails through the EmailClient, allowing for seamless integration with Azure’s communication capabilities.
  2. Azure Table Storage: Stores the details and status of sent emails, providing a reliable storage solution for tracking purposes.
  3. Razor Templating: Utilizes Razor syntax for creating dynamic email content, allowing for easy personalization based on user data.
  4. C# and .NET Framework: The application is built using C# within the .NET environment, offering a robust and efficient programming model.
  5. Newtonsoft.Json: Handles JSON serialization and deserialization, enabling easy management of dynamic data for email content.

Core Features

  1. Dynamic Email Content Generation:
    • Uses Razor templates to create personalized email bodies based on user information and ticket details.
    • Supports dynamic replacement of placeholders with actual data (e.g., first name, last name, ticket details).
  2. Email Sending Functionality:
    • The EmailPush class manages the process of sending emails, including creating email messages and handling responses from the Azure Communication Services.
    • The system checks the status of sent emails, providing feedback on whether the message was successfully queued or sent.
  3. Asynchronous Email Status Tracking:
    • Utilizes the GetSendStatus method to track the status of each email, ensuring that users can monitor delivery outcomes.
    • Incorporates a mechanism to wait for the email status to change from “Queued” to “Sent” or another final status.
  4. Batch Email Handling:
    • Supports sending multiple emails in a single run by creating a list of EmailAtt objects, which can be easily expanded for bulk operations.
    • Each email is tracked independently, allowing for detailed record-keeping of sent emails in Azure Table Storage.
  5. Integration with Azure Storage:
    • Uses Azure Table Storage to update and maintain records of sent emails, including their status and timestamps.
    • Ensures that the application can scale and manage a large volume of email records effectively.

Link to Github