Class EmailSendExecutor

java.lang.Object
ai.nervemind.app.executor.EmailSendExecutor
All Implemented Interfaces:
NodeExecutor

@Component public class EmailSendExecutor extends Object implements NodeExecutor
Node executor for sending emails via SMTP.

Sends emails using Jakarta Mail with configurable SMTP server settings. Supports plain text and HTML content, CC/BCC recipients, and TLS encryption.

Node Configuration

Email Send node parameters
Parameter Type Required Description
smtpHost String Yes SMTP server hostname
smtpPort Integer No SMTP port (default: 587)
username String Yes SMTP username
password String Yes SMTP password
useTls Boolean No Enable STARTTLS (default: true)
from String Yes Sender email address
to String Yes Comma-separated recipient addresses
cc String No Comma-separated CC addresses
bcc String No Comma-separated BCC addresses
subject String Yes Email subject line
body String Yes Email body content
bodyType String No Content type: text or html (default: text)

Output Data

  • success - Boolean indicating email was sent
  • messageId - The generated Message-ID header
  • sentAt - Timestamp when the email was sent
  • recipientCount - Total number of recipients
Since:
1.1.0
See Also:
  • Constructor Details

    • EmailSendExecutor

      public EmailSendExecutor()
      Default constructor.
  • Method Details

    • execute

      public Map<String,Object> execute(ai.nervemind.common.domain.Node node, Map<String,Object> input, ExecutionService.ExecutionContext context)
      Description copied from interface: NodeExecutor
      Executes the business logic for this node type.
      Specified by:
      execute in interface NodeExecutor
      Parameters:
      node - The node definition containing parameters and configuration. Use Node.parameters() to access user settings.
      input - Combined output from all upstream nodes that connected to this node. For simple flows, this contains the direct predecessor's output. For merge nodes, it contains combined data.
      context - Verification context providing access to workflow-scoped services, logger, and execution metadata.
      Returns:
      A Map containing the results of this node's execution. Keys in this map become available variables for downstream nodes.
      Note: Returning null is treated as an empty map.
    • getNodeType

      public String getNodeType()
      Description copied from interface: NodeExecutor
      Unique identifier for the node type this executor handles. This must match the 'type' field in the JSON definition of the node.
      Specified by:
      getNodeType in interface NodeExecutor
      Returns:
      The unique type string (e.g., "httpRequest", "llmChat").