Send transactional email from your app with Azure Communication Services: create a resource, connect an email domain, verify it, send a message, and watch delivery so you protect your sender reputation.
Azure Communication Services (ACS) Email sends email from your application — password resets, receipts, notifications. Why use it over a raw mail server: deliverability. Email providers distrust unknown senders; ACS gives you the authentication and reputation tooling that gets your mail into inboxes instead of spam folders.
Register the provider (first time only)
az provider register --namespace Microsoft.CommunicationCreate the Communication Services resource
az communication create \
--resource-group learn-rg \
--name learn-acs \
--location global --data-location UnitedStatesBefore sending, you connect an email domain to an Email Communication Service. Why: the domain is the "from" address authority. The quickest start is an Azure-managed subdomain (no DNS work); for production you add and verify your own domain.
Create the Email Communication Service
az communication email create --resource-group learn-rg \
--name learn-email --location global --data-location UnitedStatesAdd an Azure-managed domain (a ready-to-send subdomain, no DNS setup)
az communication email domain create --resource-group learn-rg \
--email-service-name learn-email \
--name AzureManagedDomain \
--location global --domain-management AzureManagedA custom domain (mail.example.com) needs DNS records proving you own it and authenticating your mail (SPF and DKIM). Why DKIM/SPF: they prove the mail genuinely came from your domain and was not altered — a major factor in not being marked as spam. Azure gives you the records to publish.
Create a custom domain entry, then read the DNS records to publish
az communication email domain create --resource-group learn-rg \
--email-service-name learn-email --name mail.example.com \
--location global --domain-management CustomerManagedShow the verification + SPF/DKIM records to add at your DNS provider
az communication email domain show --resource-group learn-rg \
--email-service-name learn-email --name mail.example.com \
--query 'verificationRecords'With a connected domain you can send. Why start with the CLI: this single call proves the whole pipeline works before you wire it into your app. Real apps usually call the ACS Email SDK from their backend rather than the CLI.
Send a test email from your Azure-managed domain
az communication email send \
--connection-string "$ACS_CONNECTION_STRING" \
--sender "donotreply@<your-managed-domain>.azurecomm.net" \
--to friend@example.com \
--subject "Hello from ACS" \
--text "It works!"Your sender reputation — how much providers trust you — is driven by low bounce and complaint rates. ACS emits delivery and engagement events you route to Event Grid, and metrics into Azure Monitor. Why: you MUST stop mailing addresses that bounce or complain, or your deliverability collapses.
View ACS email metrics in Azure Monitor (delivered, bounced, etc.)
az monitor metrics list \
--resource /subscriptions/SUB_ID/resourceGroups/learn-rg/providers/Microsoft.Communication/communicationServices/learn-acs \
--metric "EmailDelivered" "EmailBounced" \
--interval PT1H --aggregation Total --output table