// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. /** * @summary Sends an email with multiple recipients */ import { EmailClient } from "@azure/communication-email"; // Load the .env file (you will need to set these environment variables) import * as dotenv from "dotenv"; dotenv.config(); const connectionString = process.env["COMMUNICATION_CONNECTION_STRING"] || ""; const senderAddress = process.env["SENDER_ADDRESS"] || ""; const recipientAddress = process.env["RECIPIENT_ADDRESS"] || ""; const secondRecipientAddress = process.env["SECOND_RECIPIENT_ADDRESS"] || ""; const sendEmailMultipleRecipients = async () => { // Create the Email Client const emailClient = new EmailClient(connectionString); // Create the Email Message to be sent const message = { senderAddress: senderAddress, content: { subject: "This is the subject", plainText: "This is the body", html: "