Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ For simplicity, this article uses connection strings, but in production environm
### Send an email message

To send an email message, call the `beginSend` function from the `EmailClient`. This method returns a poller that checks on the status of the operation and retrieves the result once finished.
> Note:
> In `@azure/communication-email` v3.1.0 and later, the `isStarted` property was removed from `poller.getOperationState()`. The sample below uses the `status` field instead to validate that the poller has started successfully.


```javascript

Expand All @@ -187,8 +190,8 @@ async function main() {

const poller = await emailClient.beginSend(message);

if (!poller.getOperationState().isStarted) {
throw "Poller was not started."
if (poller.getOperationState().status !== "running") {
throw "Poller failed to start.";
}

Comment thread
v-dirichards marked this conversation as resolved.
let timeElapsed = 0;
Expand Down