Skip to main content
Updated in 2026.3
Send SMTP Email Node configuration panel

Description

As of Cognigy.AI 2026.4.0, the OAuth2 authentication method for the Send SMTP Email Node is deprecated. The full removal of this authentication method is planned for Cognigy.AI 2026.16.0. To avoid disruptions in AI Agents using OAuth2 in this Node, migrate to the OAuth2 Client Credentials authentication method before the removal date.
Use the Send SMTP Email Node to send an email via an SMTP connection to a recipient.

Parameters

Some email providers, such as Gmail, require you to configure your mail account to allow sending mail via SMTP before you can use it.
You can use one of the following authentication methods:
By default, the No Attachment option is selected.

Stop on Error

If switched on, the flow execution will halt in case the mail-sending fails.

Example

This example shows how to configure OAuth2 Client Credentials with Microsoft 365 SMTP using Microsoft Entra ID.
Before starting, ensure the following:
  • Your Microsoft Entra account must have one of the following roles:
    • Application Developer (minimum).
    • Cloud Application Administrator or Global Administrator (recommended).
  • The mailbox that will send emails must:
    • Be hosted in Microsoft 365 or Exchange Online.
    • Have SMTP AUTH activated.
  1. Log in to the Microsoft Entra admin center.
  2. In the left sidebar, select Entra ID > App registrations.
  3. Click New registration. On the Register an application page, enter a name, for example, Cognigy SMTP Integration.
  4. In the Supported account types section, select Accounts in any organizational directory (Any Azure AD directory - Multitenant). Follow Microsoft best practices for multitenant applications, especially regarding security and permission scope.
  5. Leave Redirect URI empty, this field isn’t required for OAuth2 Client Credentials. Click Register.
  6. After the registration, the Application Overview page appears. Copy and securely store:
    • Application (client) ID.
    • Directory (tenant) ID.
    You will need these IDs later for the Send SMTP Email Node.
  1. In the created application, go to Manage > Certificates & secrets.
  2. Click New client secret.
  3. Enter the required information:
  • Description – for example, Cognigy SMTP Secret.
  • Expiration – specify the date according to your company’s security policy.
  1. Click Add. Copy the appeared secret value and store it securely. You will need this secret later for the Send SMTP Email Node.
  1. Add the SMTP.SendAsApp permission to your Microsoft Entra application. Ensure admin consent is granted where required.
  2. Register a Service Principal for your application.
  1. In the Send SMTP Email Node, select Microsoft 365 as the email service.
  2. For the Authentication Method, select OAuth2 Client Credentials and click + to create a new connection.
  3. In the connection configuration, fill in the required fields:
  • Connection Name — enter a unique name for the connection.
  • Client ID — enter the application (Client) ID from Microsoft Entra.
  • Client Secret — enter the secret value created under Certificates & Secrets from Microsoft Entra.
  • Scope — enter https://outlook.office365.com/.default
  • Token Endpoint URL — enter https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token and replace {tenant_id} with your Directory (tenant) ID from Microsoft Entra.
  • User — enter the email address of the sender mailbox. Make sure SMTP AUTH is activated for the user, and the user is granted the SMTP.SendAsApp permission.
  1. Click Create to save the connection, then fill in the required fields for the email configuration, such as Recipient TO Email Addresses, Email Subject, and Email Content.
Last modified on June 15, 2026