• Preparing search index...
  • The search index is not available
SAP Cloud SDK for JavaScript - v3.26.4
  • SAP Cloud SDK for JavaScript
  • @sap-cloud-sdk/mail-client
  • sendMail

Function sendMail

  • sendMail<T extends MailConfig>(
        destination: DestinationOrFetchOptions,
        mailConfigs: T | T[],
        mailClientOptions?: MailClientOptions,
    ): Promise<MailResponse[]>

    Sends e-mails to a target mail server defined in a given destination. Builds a transport between the application and the mail server, sends mails sequentially by using the transport, then closes it. This function also does the destination look up, when passing DestinationOrFetchOptions.

    Type Parameters

    • T extends MailConfig

    Parameters

    • destination: DestinationOrFetchOptions

      A destination or a destination name and a JWT.

    • mailConfigs: T | T[]

      A single object or an array of MailConfig.

    • OptionalmailClientOptions: MailClientOptions

      A MailClientOptions that defines the configurations of the mail client, e.g., how to set up an SMTP transport, including SSL and tls configurations.

    Returns Promise<MailResponse[]>

    A promise resolving to an array of MailResponse.

    See

    https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination#referencing-destinations-by-name

    Copyright Ⓒ 2025 SAP SE or an SAP affiliate company. All rights reserved.

    • Defined in packages/mail-client/dist/mail-client.d.ts:22

Settings

Member Visibility
SAP Cloud SDK for JavaScript - v3.26.4
  • Loading...