Blog Post

Azure Communication Services Blog
5 MIN READ

Getting Started with Email in Azure Communication Services

seankeegan's avatar
seankeegan
Icon for Microsoft rankMicrosoft
May 21, 2025

If you’ve already dipped your toes into email with Azure Communication Services, you know it’s easy to get started. But what happens after that first email?

This blog is your guide to going from “I sent an email” to “I built something useful.” We’ve put together a four-part video series that walks through everything from sending your first message in the portal to tracking engagement in real time and triggering workflows when someone clicks a link.

Whether you’re building a notification system, a marketing campaign, or just exploring what’s possible, this series helps you get up and running—and doing more—with email from Azure Communication Services.

Video 1: Send your first email from the Azure Portal

In this first video, we demonstrate how to send an email directly from the Azure portal—no code required.

Here’s what we cover:

  • Create an Email Communication resource
  • Choose between a free Azure-managed subdomain or a custom domain
  • Verify your domain (including DNS setup for custom domains)
  • Connect your domain to your Communication Services resource
  • Add custom “From” addresses and suppression lists
  • Send your first email directly from the portal (with kittens, if you’d like)

If you’re just exploring or want to test things quickly, the Azure-managed subdomain is the fastest way to get started. But if you want more control—like sending from your own domain or enabling user engagement tracking—you want to go the custom domain route.

Once your domain is verified and connected, you can send emails right from the portal Try Email feature. Just fill out the form, choose your sender, add a recipient, and hit send. The portal even generates sample code in multiple languages based on your selections.

Video 2: Send email using the JavaScript quickstart SDK

Once you send your first email from the portal, the next step is sending email programmatically. This video walks through how to do that using the official JavaScript quickstart from the Azure Communication Services GitHub repo.

Here’s what you’ll see:

  • Cloning the quickstart repo and navigating to the send-email folder
  • Opening the send-email.js file and updating three key values:

    • Your Azure Communication Services connection string
    • Your verified sender email address
    • The recipient email address
  • Running the script with just two commands:

The script sends a simple HTML email, and you see it land in your inbox in real time. It’s a great starting point for integrating email into your own apps or workflows.

Video 3: Analyzing email logs in the Azure Portal

Once you can send emails, the next question is: how are they performing?

This video proves a step-by-step guide to set up logging and telemetry for your Azure Communication Services email resource—so you can track delivery, failures, engagement, and more. It’s all done through the Azure portal, and once it’s configured, you’ll have access to both high-level dashboards and detailed log queries.

Here’s what’s covered:

✅ Prerequisites

Before you can start analyzing logs, you’ll need:

  • An active email resource that’s already sending messages
  • A Log Analytics workspace (this is where your logs live)

🛠️ Step 1: Create a Log Analytics Workspace

This is your central hub for telemetry data. You’ll create it like any other Azure resource—just give it a name, choose your subscription and resource group, and hit Create.

🛠️ Step 2: Configure Diagnostic Settings

Next, connect your Communication Services resource to the workspace:

  • Go to your Communication Services resource
  • Under Monitoring, select Diagnostic settings
  • Add a new setting and select the email-related log categories:
    • Send mail logs
    • Delivery status updates
    • User engagement logs
  • Point them to your Log Analytics workspace and save

Once that’s done, your logs start flowing automatically.

📊 Step 3: Explore Built-in Insights

With logging enabled, you can use the Insights tab in the portal to get a high-level overview of:

  • Emails delivered, failed, or suppressed
  • Engagement metrics like opens and clicks
  • Performance summaries and error breakdowns

It’s a great way to get a quick pulse on how your email system is doing.

🔍 Step 4: Run Custom Queries with KQL

For deeper analysis, head to the Logs section and use the built-in query hub. The video covers several examples using Kusto Query Language (KQL), including how to:

  • Find bounced or suppressed emails
  • Filter by delivery status or failure reason
  • Track engagement by link clicks or views
  • Drill into specific emails using correlation IDs

You can even export results to CSV, Power BI, or Excel—or share queries with teammates.

Whether you’re debugging delivery issues or analyzing campaign performance, this setup gives you the visibility you need.

Video 4: Real-Time email event tracking with Azure Event Grid

Want to know the moment someone opens your email? Or clicks a link in your campaign? This video shows how to set up real-time email event tracking using Azure Event Grid and a lightweight web app called the Azure Event Grid Viewer.

Here’s what’s covered:

🧱 Step 1: Deploy the Azure Event Grid Viewer

The Event Grid Viewer is a simple web app that listens for incoming events and displays them in real time. You can deploy it in just a few clicks using a prebuilt GitHub repo and the Deploy to Azure button.

Once deployed, you get a live URL that acts as a webhook endpoint—ready to receive email events.

🔗 Step 2: Create an Event Subscription

Back in your Azure Communication Services resource:

  • Go to the Events tab
  • Click + Event Subscription
  • Choose the event types you want to track (such as Email Delivery Report or Email Engagement Tracking)
  • Set the endpoint type to Webhook
  • Paste in the Event Grid Viewer URL (ending in /api/updates)

Now, every time one of those events occurs, it is sent to your viewer in real time.

📬 Step 3: Send Emails and Watch Events Roll In

Once your subscription is active, try sending a few emails from the portal. You see events appear in the viewer as they happen:

  • Delivery confirmations
  • Open events
  • Link clicks (with details on which link was clicked)

It’s a great way to test your setup and see how email events flow through the system.

🎯 Bonus: Filter Events by Type

Don’t want to see every single event? You can filter them. For example, only show events where the engagement type is click. Just go back to your event subscription, add a filter on data.engagementType, and set it to click.

You can even filter by correlation ID to track specific campaigns or recipients.

⚙️ Automate Anything

The Event Grid Viewer is just one example. You can use these events to trigger:

  • Azure Functions
  • Power Automate flows
  • Notifications in Microsoft Teams
  • Custom dashboards
  • Anything else that fits your workflow

If it can react to a webhook, it can react to an email event.

Wrapping Up

That’s the full tour—from sending your first email in the portal to tracking engagement in real time.

Here’s a quick recap of what we covered:

  1. Send your first email using the Azure portal
  2. Send programmatically using the JavaScript quickstart
  3. Analyze logs and telemetry with Log Analytics and KQL
  4. Track events in real time with Azure Event Grid

Whether you’re building a notification system, a marketing campaign, or just exploring what’s possible, Azure Communication Services gives you the tools to do it—fast. Check out any of the videos or read our documentation to learn more about email in Azure Communication Services.

 

Updated May 20, 2025
Version 1.0
No CommentsBe the first to comment