Hello Aalap,
Thank you for posting your question in the Microsoft Q&A forum.
The issue you're encountering is related to the sender address validation in Azure Communication Services (ACS). By default, ACS only allows sending emails from specific pre-approved sender addresses, such as DoNotReply@<from_domain>. To send emails from other addresses (e.g., addresses in your custom domain), you need to verify and configure those sender addresses in your Azure Communication Services resource.
To send emails from addresses in your custom domain, you must first verify ownership of the domain. - Useful link https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/email-overview
- Navigate to your Azure Communication Services resource in the Azure portal.
- Go to Email --> Domains.
- Click Add Domain.
- Enter your domain name (e.g., yourdomain.com) and click Verify.
- Azure will provide you with a TXT record to add to your domain's DNS settings.
- Go to your domain registrar or DNS provider and add the TXT record.
- Wait for DNS propagation (this can take a few minutes to several hours).
Once the domain is verified, it will appear in the Domains section with a status of Verified.
After verifying your domain, you need to configure the sender addresses you want to use. Useful link - https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/add-multiple-senders-mgmt-sdks?pivots=programming-language-csharp
- In the Azure portal, go to Email --> Sender Usernames.
- Click Add Sender Username.
- Enter the email address you want to use (e.g., ******@yourdomain.com).
- Click Save.
If you encounter errors, check the Sender Usernames section in the Azure portal to ensure the address is correctly configured. The link may be useful - https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/send-email?tabs=windows%2Cconnection-string%2Csend-email-and-get-status-async%2Csync-client&pivots=platform-azportal
If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue.