Skip to content

Commit c6ce097

Browse files
authored
Merge pull request #199319 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents c7d9030 + 1d6b8ae commit c6ce097

File tree

9 files changed

+45
-59
lines changed

9 files changed

+45
-59
lines changed

articles/active-directory-b2c/quickstart-web-app-dotnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Azure Active Directory B2C provides functionality to allow users to update their
8585
8686
The ASP.NET web application includes an Azure AD access token in the request to the protected web API resource to perform operations on the user's to-do list items.
8787
88-
You've successfully used your Azure AD B2C user account to make an authorized call an Azure AD B2C protected web API.
88+
You've successfully used your Azure AD B2C user account to make an authorized call to an Azure AD B2C protected web API.
8989
9090
9191
## Next steps

articles/communication-services/concepts/reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ For each area, we have external pages to track and review our SDKs. You can cons
2424
| Calling | [npm](https://www.npmjs.com/package/@azure/communication-calling) | - | - | - | [GitHub](https://github.com/Azure/Communication/releases) ([docs](/objectivec/communication-services/calling/)) | [Maven](https://search.maven.org/artifact/com.azure.android/azure-communication-calling/) | - |
2525
| Chat | [npm](https://www.npmjs.com/package/@azure/communication-chat) | [NuGet](https://www.nuget.org/packages/Azure.Communication.Chat) | [PyPi](https://pypi.org/project/azure-communication-chat/) | [Maven](https://search.maven.org/search?q=a:azure-communication-chat) | [GitHub](https://github.com/Azure/azure-sdk-for-ios/releases) | [Maven](https://search.maven.org/search?q=a:azure-communication-chat) | - |
2626
| Common | [npm](https://www.npmjs.com/package/@azure/communication-common) | [NuGet](https://www.nuget.org/packages/Azure.Communication.Common/) | N/A | [Maven](https://search.maven.org/search?q=a:azure-communication-common) | [GitHub](https://github.com/Azure/azure-sdk-for-ios/releases) | [Maven](https://search.maven.org/artifact/com.azure.android/azure-communication-common) | - |
27+
| Email | [npm](https://www.npmjs.com/package/@azure/communication-email) | [NuGet](https://www.nuget.org/packages/Azure.Communication.Email) | - | - | - | - | - |
2728
| Identity | [npm](https://www.npmjs.com/package/@azure/communication-identity) | [NuGet](https://www.nuget.org/packages/Azure.Communication.Identity) | [PyPi](https://pypi.org/project/azure-communication-identity/) | [Maven](https://search.maven.org/search?q=a:azure-communication-identity) | - | - | - |
2829
| Network Traversal | [npm](https://www.npmjs.com/package/@azure/communication-network-traversal) | [NuGet](https://www.nuget.org/packages/Azure.Communication.NetworkTraversal) | [PyPi](https://pypi.org/project/azure-communication-networktraversal/) | [Maven](https://search.maven.org/search?q=a:azure-communication-networktraversal) | - | - | - |
2930
| Phone numbers | [npm](https://www.npmjs.com/package/@azure/communication-phone-numbers) | [NuGet](https://www.nuget.org/packages/Azure.Communication.phonenumbers) | [PyPi](https://pypi.org/project/azure-communication-phonenumbers/) | [Maven](https://search.maven.org/search?q=a:azure-communication-phonenumbers) | - | - | - |

articles/communication-services/concepts/voice-video-calling/calling-sdk-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The maximum call duration is 30 hours, participants that reach the maximum call
107107

108108
## JavaScript Calling SDK support by OS and browser
109109

110-
The following table represents the set of supported browsers which are currently available. **We support the most recent three versions of the browser** unless otherwise indicated.
110+
The following table represents the set of supported browsers which are currently available. **We support the most recent three major versions of the browser (most recent three minor versions for Safari)** unless otherwise indicated.
111111

112112
| Platform | Chrome | Safari | Edge (Chromium) |
113113
| ------------ | ------ | ------ | -------------- |

articles/communication-services/quickstarts/email/includes/send-email-js.md

Lines changed: 29 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: azure-communication-services
1111
ms.custom: private_preview, event-tier1-build-2022
1212
---
1313

14-
Get started with Azure Communication Services by using the Communication Services C# Email client library to send Email messages.
14+
Get started with Azure Communication Services by using the Communication Services JS Email client library to send Email messages.
1515

1616
Completing this quick start incurs a small cost of a few USD cents or less in your Azure account.
1717

@@ -42,7 +42,7 @@ Run `npm init -y` to create a **package.json** file with default settings.
4242
npm init -y
4343
```
4444

45-
Use a text editor to create a file called **send-email.js** in the project root directory. You'll add all the source code for this quickstart to this file in the following sections.
45+
Use a text editor to create a file called **send-email.js** in the project root directory. Change the "main" property in **package.json** to "send-email.js". You'll add all the source code for this quickstart to this file in the following sections.
4646

4747
### Install the package
4848
Use the `npm install` command to install the Azure Communication Services Email client library for JavaScript.
@@ -59,27 +59,30 @@ The following classes and interfaces handle some of the major features of the Az
5959

6060
| Name | Description |
6161
| --------------------| -----------------------------------------------------------------------------------------------------------------------------------------------------|
62-
| EmailAddress | This class contains an email address and an option for a display name. |
63-
| EmailAttachment | This class creates an email attachment by accepting a unique ID, email attachment type, and a string of content bytes. |
62+
| EmailAddress | This interface contains an email address and an option for a display name. |
63+
| EmailAttachment | This interface creates an email attachment by accepting a unique ID, email attachment type, and a string of content bytes. |
6464
| EmailClient | This class is needed for all email functionality. You instantiate it with your connection string and use it to send email messages. |
65-
| EmailClientOptions | This class can be added to the EmailClient instantiation to target a specific API version. |
66-
| EmailContent | This class contains the subject and the body of the email message. The importance can also be set within the EmailContent class. |
67-
| EmailCustomHeader | This class allows for the addition of a name and value pair for a custom header. |
68-
| EmailMessage | This class combines the sender, content, and recipients. Custom headers, attachments, and reply-to email addresses can optionally be added, as well. |
69-
| EmailRecipients | This class holds lists of EmailAddress objects for recipients of the email message, including optional lists for CC & BCC recipients. |
70-
| SendStatusResult | This class holds lists of status of the email message delivery.
65+
| EmailClientOptions | This interface can be added to the EmailClient instantiation to target a specific API version. |
66+
| EmailContent | This interface contains the subject, plaintext, and html of the email message. |
67+
| EmailCustomHeader | This interface allows for the addition of a name and value pair for a custom header. |
68+
| EmailMessage | This interface combines the sender, content, and recipients. Custom headers, importance, attachments, and reply-to email addresses can optionally be added, as well. |
69+
| EmailRecipients | This interface holds lists of EmailAddress objects for recipients of the email message, including optional lists for CC & BCC recipients. |
70+
| SendStatusResult | This interface holds the messageId and status of the email message delivery.
7171

7272
## Authenticate the client
7373

74-
Import the **EmailClient** from the client library and instantiate it with your connection string. The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
74+
Import the **EmailClient** from the client library and instantiate it with your connection string.
75+
76+
The code below retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING` using the dotenv package. Use the `npm install` command to install the dotenv package. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
77+
78+
```console
79+
npm install dotenv
80+
```
7581

7682
Add the following code to **send-email.js**:
7783

7884
```javascript
79-
const { EmailRestApiClient } = require("@azure/communication-email");
80-
const communication_common = require("@azure/communication-common");
81-
const core_http = require("@azure/core-http");
82-
const uuid = require("uuid");
85+
const { EmailClient } = require("@azure/communication-email");
8386
require("dotenv").config();
8487

8588
// This code demonstrates how to fetch your connection string
@@ -93,45 +96,31 @@ To send an Email message, you need to
9396
- Add Recipients
9497
- Construct your email message with your Sender information you get your MailFrom address from your verified domain.
9598
- Include your Email Content and Recipients and include attachments if any
96-
- Calling the SendEmail method:
99+
- Calling the send method:
97100

98101
Replace with your domain details and modify the content, recipient details as required
99102

100103
```javascript
101104

102105
async function main() {
103106
try {
104-
const { url, credential } = communication_common.parseClientArguments(connectionString);
105-
const options = {};
106-
options.userAgentOptions = {};
107-
options.userAgentOptions.userAgentPrefix = `azsdk-js-communication-email/1.0.0`;
108-
const authPolicy = communication_common.createCommunicationAuthPolicy(credential);
109-
const pipeline = core_http.createPipelineFromOptions(options, authPolicy);
110-
this.api = new EmailRestApiClient(url, pipeline);
107+
var client = new EmailClient(connectionString);
111108
//send mail
112-
const unique_id = uuid.v4();
113-
const repeatabilityFirstSent = new Date().toUTCString();
114109
const emailMessage = {
115110
sender: "<[email protected]>",
116111
content: {
117112
subject: "Welcome to Azure Communication Service Email.",
118-
body: {
119-
plainText: "<This email meessage is sent from Azure Communication Service Email using JS SDK.>"
120-
},
113+
plainText: "<This email message is sent from Azure Communication Service Email using JS SDK.>"
121114
},
122115
recipients: {
123-
toRecipients: [
116+
to: [
124117
{
125-
email: "[email protected]>",
118+
email: "<[email protected]>",
126119
},
127120
],
128121
},
129122
};
130-
var response = await this.api.email.sendEmail(
131-
unique_id,
132-
repeatabilityFirstSent,
133-
emailMessage
134-
);
123+
var response = await client.send(emailMessage);
135124
} catch (e) {
136125
console.log(e);
137126
}
@@ -140,11 +129,10 @@ main();
140129
```
141130
## Getting MessageId to track email delivery
142131

143-
To track the status of email delivery, you need to get the MessageId back from response and track the status. If there's no MessageId retry the request.
132+
To track the status of email delivery, you need to get the MessageId back from response and track the status. If there's no MessageId, retry the request.
144133

145134
```javascript
146-
// check mail status, wait for 5 seconds, check for 60 seconds.
147-
const messageId = response._response.parsedHeaders.xMsRequestId;
135+
const messageId = response.messageId;
148136
if (messageId === null) {
149137
console.log("Message Id not found.");
150138
return;
@@ -154,13 +142,12 @@ To track the status of email delivery, you need to get the MessageId back from r
154142
## Getting status on email delivery
155143
To get the delivery status of email call GetMessageStatus API with MessageId
156144
```javascript
157-
158-
const context = this;
145+
// check mail status, wait for 5 seconds, check for 60 seconds.
159146
let counter = 0;
160147
const statusInterval = setInterval(async function () {
161148
counter++;
162149
try {
163-
const response = await context.api.email.getSendStatus(messageId);
150+
const response = await client.getSendStatus(messageId);
164151
if (response) {
165152
console.log(`Email status for ${messageId}: ${response.status}`);
166153
if (response.status.toLowerCase() !== "queued" || counter > 12) {
@@ -176,14 +163,9 @@ To get the delivery status of email call GetMessageStatus API with MessageId
176163

177164
| Status Name | Description |
178165
| --------------------| -----------------------------------------------------------------------------------------------------------------------------------------------------|
179-
| None | An email with this messageId couldn't be found. |
180166
| Queued | The email has been placed in the queue for delivery. |
181167
| OutForDelivery | The email is currently en route to its recipient(s). |
182-
| InternalError | An error occurred internally during the delivery of this message. Try again. |
183168
| Dropped | The email message was dropped before the delivery could be successfully completed. |
184-
| InvalidEmailAddress | The sender and/or recipient email address(es) is/are not valid. |
185-
| InvalidAttachments | The content bytes string for the attachment isn't valid. |
186-
| InvalidSenderDomain | The sender's email address domain isn't valid. |
187169

188170
## Run the code
189171

@@ -194,4 +176,4 @@ node ./send-email.js
194176
```
195177
## Sample code
196178

197-
You can download the sample app from [GitHub](https://github.com/moirf/communication-services-javascript-quickstarts/tree/main/send-email)
179+
You can download the sample app from [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/send-email)

articles/container-instances/container-instances-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ This error indicates that due to heavy load in the region in which you are attem
9494
## Issues during container group runtime
9595
### Container had an isolated restart without explicit user input
9696

97-
There are two broad categories for why a container group may restart without explicit user input. First, containers may experience restarts caused by an application process crash. The ACI service recommends leveraging observability solutions such as Application Insights SDK, container group metrics, and container group logs to determine why the application experienced issues. Second, customers may experience restarts initiated by the ACI infrastructure due to maintenance events. To increase the availability of your application, run multiple container groups behind an ingress component such as an Application Gateway or Traffic Manager.
97+
There are two broad categories for why a container group may restart without explicit user input. First, containers may experience restarts caused by an application process crash. The ACI service recommends leveraging observability solutions such as [Application Insights SDK](../azure-monitor/app/app-insights-overview.md), [container group metrics](container-instances-monitor.md), and [container group logs](container-instances-get-logs.md) to determine why the application experienced issues. Second, customers may experience restarts initiated by the ACI infrastructure due to maintenance events. To increase the availability of your application, run multiple container groups behind an ingress component such as an [Application Gateway](../application-gateway/overview.md) or [Traffic Manager](../traffic-manager/traffic-manager-overview.md).
9898

9999
### Container continually exits and restarts (no long-running process)
100100

0 commit comments

Comments
 (0)