Matterway
    Preparing search index...

    Function sendEmail

    • Sends an email using the Microsoft Graph API.

      Parameters

      • client: Client

        The Microsoft Graph client instance.

      • options: {
            subject: string;
            content: string;
            emailsTo: string[];
            contentType?: string;
            attachments?: MwFile[];
        }

        The options for sending the email.

        • subject: string

          The subject of the email.

        • content: string

          The content of the email.

        • emailsTo: string[]

          An array of recipient email addresses.

        • OptionalcontentType?: string

          The content type of the email body (default is 'HTML').

        • Optionalattachments?: MwFile[]

          An optional array of attachments to include in the email.

      Returns Promise<void>

      A promise that resolves when the email has been sent.

      const client = getMsGraphClient(options);
      const options = {
      subject: 'Hello World',
      content: '<p>This is a test email.</p>',
      emailsTo: ['example@example.com'],
      contentType: 'HTML',
      attachments: [
      sdkFile1,
      sdkFile2,
      ]
      };
      await sendEmail(client, options);