3

I created a communication service in azure to send mail. Then I added a verified custom domain. However, when I send an email, I get an error like this;

RestError: The specified sender domain has not been linked.

I am able to send successfully with azure managed domain mail.

Here is my code:

 const connectionString = `endpoint=https://*******`;
    const client = new EmailClient(connectionString);

    const emailMessage = {
        sender: "noreply@****.com",
        content: {
            subject: "This is the subject",
            plainText: "This is the body",
        },
        recipients: {
            to: [
                {
                    email: "*****",
                    displayName: "Test test",
                },
            ],
        },
    };

    const message = await client.send(emailMessage);

How can I solve this problem ?

rocky
  • 7,506
  • 3
  • 33
  • 48
  • Kindly check your connection link go to your created communication service under settings select your custom domain in domains and then click on link. – vijaya Jan 16 '23 at 08:58
  • I had the same issue and it worked. cant we add more verified domains and send emails from different domains from one communication services? – Venkat Jun 23 '23 at 06:33

2 Answers2

3

You need to create an Email Communication Services (ECS) resource and connect it to your Azure Communication Services (ACS) resource before start sending emails. Please have a look at below documentations:

Ebraheem
  • 603
  • 6
  • 24
1

The problem has been resolved with Custome domain creation from Azure Active Directory. https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/add-custom-domain

Note: Add custome domain through Azure Communication Service is not providing MX record. Where we can get TXT and MX record which need to be add records on our DNS service provider setting. Reference https://learn.microsoft.com/en-us/answers/questions/1183905/azure-communication-service-give-error-the-specifi?page=1&orderby=helpful