How to use Custom User to send emails from Azure Communication Services?

Polamreddy Lakshmi Narayana 0 Reputation points
2024-11-20T11:57:55.1566667+00:00

I have successfully created resources in Azure for Azure Communication Services to send emails. My domain has been fully authenticated for over 12 hours, and I have connected the domain to send emails. The setup is successful, and I can send emails using the default customer user (donotreply@). However, I am unable to add any new users. I need to send emails from my custom email address (e.g., myemail@domain.com). How can I add users to enable sending emails from my custom email address?

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
927 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 1,065 Reputation points Microsoft Vendor
    2024-11-21T06:34:39.4533333+00:00

    Hi @Polamreddy Lakshmi Narayana ,
    Welcome to the Microsoft Q&A Platform!
    To send emails from a custom email address using Azure Communication Services (ACS).
    Verify the Domain

    Ensure your domain (e.g., domain.com) is verified in ACS.

    Go to Azure Portal > Azure Communication Services > Email > Senders.

    Click + Add sender and enter your custom email (e.g., myemail@domain.com).

    Verify the custom email by confirming the verification email sent to it.

    Ensure your custom email (myemail@domain.com) exists and is verified in Azure Active Directory (Azure AD).

    Use ACS Identity SDK or SAS token to authenticate the custom user for sending emails.

    Use the ACS SDK (e.g., .NET) to send an email from the custom address

    var client = new EmailClient("<your-connection-string>");
    var senderAddress = "myemail@domain.com";  // Custom sender email
    var emailMessage = new EmailMessage(senderAddress, "recipient@domain.com", "Subject", "Body");
    await client.SendAsync(emailMessage);
    

    Ensure domain is verified and custom sender is added correctly.

    Check authentication using SAS token or Azure AD credentials.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.