// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { KnownEmailSendStatus } from "../../src"; import { env } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { createRecordedEmailClientWithConnectionString } from "./utils/recordedClient"; describe(`EmailClient [Playback/Live]`, function () { let recorder; let client; beforeEach(async function () { ({ client, recorder } = await createRecordedEmailClientWithConnectionString(this)); }); afterEach(async function () { var _a; if (!((_a = this.currentTest) === null || _a === void 0 ? void 0 : _a.isPending())) { await recorder.stop(); } }); it("successfully sends an email to a single recipient", async function () { const emailMessage = { senderAddress: env.SENDER_ADDRESS || "", recipients: { to: [ { address: env.RECIPIENT_ADDRESS || "", displayName: "someRecipient", }, ], }, content: { subject: "someSubject", plainText: "somePlainTextBody", html: "

someHtmlBody