Class EmailSendExecutor
java.lang.Object
ai.nervemind.app.executor.EmailSendExecutor
- All Implemented Interfaces:
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
| 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ai.nervemind.common.domain.Node node, Map<String, Object> input, ExecutionService.ExecutionContext context) Executes the business logic for this node type.Unique identifier for the node type this executor handles.
-
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:NodeExecutorExecutes the business logic for this node type.- Specified by:
executein interfaceNodeExecutor- Parameters:
node- The node definition containing parameters and configuration. UseNode.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: Returningnullis treated as an empty map.
-
getNodeType
Description copied from interface:NodeExecutorUnique identifier for the node type this executor handles. This must match the 'type' field in the JSON definition of the node.- Specified by:
getNodeTypein interfaceNodeExecutor- Returns:
- The unique type string (e.g., "httpRequest", "llmChat").
-