繁体   English   中英

Azure 通信服务 email 发送错误

[英]Azure communication service email sending error

我在azure中创建了一个通信服务来发送邮件。 然后我添加了一个经过验证的自定义域。 但是,当我发送 email 时,出现这样的错误;

RestError:指定的发件人域尚未链接。

我能够使用 azure 托管域邮件成功发送。

这是我的代码:

 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);

我怎么解决这个问题?

在开始发送电子邮件之前,您需要创建一个Email 通信服务(ECS) 资源并将其连接到您的Azure 通信服务(ACS) 资源。 请查看以下文档:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM