Email Client

Email Client

ID: uniflow.plugin.emailclient Category: Web & Messaging Services Version: v1.3.0 Min Uniflow Version: Uniflow ≥ v1.4.0

Email Client Plugin Reference Manual

1. Overview

Plugin Name: Email Client

Type: Generic Protocol

Identifier: uniflow.plugin.emailclient

Description

Receive data from external systems via POP3/IMAP email accounts.


2. Technical Architecture

The Email Client plugin implements SMTP transmission and IMAP/POP3 receiving handlers using MailKit and MimeKit. It connects to remote mail servers with SSL/TLS encryption, executes scheduled polling or IMAP IDLE push listeners for unread messages, parses MIME message headers, HTML/Text bodies, and attachments into catalog telemetry events, and dispatches outbound emails via SMTP.

System Interaction & Exposed Catalog Routes

The Email Client plugin provides secure SMTP sending and IMAP inbox polling. It dispatches automated HTML/plain-text email alerts with attachments and monitors incoming inbox messages to trigger workflows based on subject or sender matches.

Catalog Routes & Node Integration

Input Event Triggers (Input Nodes):

  • email.inbox_message_received - Emitted when a new email matching rules arrives.
  • email.connection_state_changed - Mail server connection status event.
  • Executable Actions (Action Nodes):

  • email.send_email - Sends a custom email with attachments.
  • email.send_alert_template - Sends a pre-configured alert template.
  • email.mark_read - Marks an IMAP message as processed.
  • Architecture Diagram

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    3. Configuration Parameters

    The following configuration fields are available in the User Interface for this plugin:

    Configuration SettingDescription
    Server HostSpecifies the server host.
    PortNumeric value specifying the port.
    ProtocolSpecifies the protocol.
    EncryptionSpecifies the encryption.
    Username / EmailSpecifies the username / email.
    Password / App PasswordSpecifies the password / app password (secure).
    SMTP HostSpecifies the smtp host.
    SMTP PortNumeric value specifying the smtp port.
    SMTP EncryptionSpecifies the smtp encryption.
    Poll Interval (ms)Numeric value specifying the poll interval (ms).
    Poll EnabledToggle to enable or disable poll enabled.
    Delete After ReadSpecifies the delete after read.
    Skip Certificate ValidationSpecifies the skip certificate validation.

    4. Exposed Routes & Data Types

    This plugin exposes catalog fields across the following rule graph nodes:

    Input Source

    The Input Source node reads header fields and text content of the last received email message.

    Human-Readable Field NameData TypeDescription
    Subject  String
    Subject header line of the most recently received email message.
    From  String
    Sender email address of the last received message.
    Body  String
    Text body content of the last received email message.
    Date  String
    Timestamp header string of the last received message.

    Event Input

    The Event Input node listens for new incoming email messages arriving in the inbox via IMAP/POP3.

    Human-Readable Field NameData TypeExposed Event Fields & Data TypesDescription
    New Email Event  Event Object
    From (String)
    Subject (String)
    Body (String)
    Date (DateTime)
    Real-time event triggered immediately whenever a new email is fetched from the mail server.

    Output Target

    The Output Target node acts as an action sink node to construct and transmit emails via SMTP.

    Target NameData TypeAssociated ParametersParameter Data TypeRequiredDescription
    Send Email  Json
    To (To)StringTrueDestination recipient email address.
    Subject (Subject)StringTrueOutgoing email subject line.
    Body (Body)StringTruePlain text or HTML message body content.

    5. Usage Examples

    Scenario A: Modbus Boiler Temperature Alarm Dispatches SMTP Emergency Email Alert

    Workflow Overview:

    When Modbus Client detects boiler temperature exceeding high limit (HoldingRegister 101 > 95.0°C), Uniflow constructs a formatted HTML alert body ("CRITICAL: Boiler Over-Temperature Detected: 96.5°C") and dispatches (email.send_email) an SMTP email to the facility engineering team (engineers@factory.local).

    Rule Node Configuration:

    1. Input Source Node: Modbus Client Poller

  • Register Type: Holding Register
  • Address: 101
  • Exposed Field: BoilerTemp (Double)
  • 2. Logic Condition Node: GreaterThan

  • Expression: BoilerTemp > 95.0
  • 3. Output Target Node: Email Client Sender

  • Action Target: Send Email (email.send_email)
  • To: engineers@factory.local
  • Subject: CRITICAL: Boiler Over-Temperature Alarm
  • Body: <h3>Emergency Alert</h3><p>Boiler 1 Temperature exceeded limit: ${BoilerTemp}°C</p>
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    Scenario B: IMAP Inbox E-Stop Command Email Sets Modbus Coil State

    Workflow Overview:

    When an incoming email arrives with Subject "CMD: ESTOP" from an authorized operator email (manager@factory.local), Uniflow intercepts the IMAP message (email.inbox_message_received), validates sender address, and sets a Modbus TCP emergency stop coil (Coil 0 = True).

    Rule Node Configuration:

    1. Event Input Node: Email Client Listener

  • Filter Event: email.inbox_message_received
  • Exposed Fields: From (String), Subject (String), Body (String)
  • 2. Logic Filter Node: And Condition

  • Expression: From == "manager@factory.local" AND Subject == "CMD: ESTOP"
  • 3. Output Target Node: Modbus Client Writer

  • Action Target: Direct Access
  • Type: Coils
  • Address: 0
  • Value: True
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...
    Architecture Flow Diagram — Full Preview