Azure Communication Services : unable to send an email using JS SDK

Etienne HOVAERE 41 Reputation points


as I'm using ACS for call features, I decided to know use it to send emails.

I thus installed @azure/communication-email": "^1.0.0-beta.1"
(are some feature of ACS not in preview??!!)

anyway, following the tutorial, I'm doing that:

const client = new EmailClient("endpoint=;accesskey=hypersecret");  
const emailMessage: EmailMessage = {  
  sender: "",  
  content: {  
 subject: "test",  
 plainText: 'test',  
  recipients: {  
 to: [  
 email: "",  
 displayName: "Customer Name"  
const response = await client.send(emailMessage);  

and it takes a few minutes to finally return the following HTML

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' ''><html xmlns=''><head><meta content='text/html; charset=utf-8' http-equiv='content-type'/><style type='text/css'>body {font-family:Arial; margin-left:40px; }img  { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p  { font-size: 13px; color: #000000; margin: 7px 0px 0px0px}#errorref { font-size: 11px; color: #737373; margin-top: 41px }</style><title>Service unavailable</title></head><body><div id='content'><div id='message'><h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p></div><div id='errorref'><span>04SxtYwAAAADXcapFF0D+SJq+iV9LXU6XUEFSMDJFREdFMDYyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=</span></div></div></body></html>  

Could you please help me to use the API ?

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