This provides sample codes to provision Azure Email Communication Services (ECS) resource and apps using it to send emails.
- .NET SDK 8 or later
- Visual Studio Code
- Azure Developer CLI
- Azure CLI with the Communication extension
- A custom domain name to use with the Azure Email Communication Services (ECS) resource
-
Fork this repository to your GitHub account.
-
Run the commands below to set up a resource names:
# Bash AZURE_ENV_NAME="notifications$RANDOM" # PowerShell $AZURE_ENV_NAME="notifications$(Get-Random -Min 1000 -Max 9999)"
-
Run the commands below to provision Azure resources:
azd auth login azd init -e $AZURE_ENV_NAME azd up
Note: You may be asked to enter your Azure subscription, desired location and data location, custom domain name, and custom email address to provision resources. If you don't provide the custom domain name, only Azure managed domain will be provisioned.
-
Verify the custom domain by following this document: Verify custom domain for ECS
-
Connect the custom domain to ACS by following this document: Connect custom domain to ACS
-
Send a test email using the custom email address as a sender by following this document: Send an email via ACS