Heisenware Docs
Go to websiteGet a demo
  • 👋Welcome
  • Getting started
  • Release Notes
    • v84 - Get in the flow
    • v83 - Beauty treatment
    • v82 — Fully distributed
    • v81 — Removing old cruft
    • v80 — Chicks on fire
    • v79 — Nothing is forever
    • v78 — Keep moving
    • v77 — More intelligence
    • v76 — Well cooked
  • Build & Deploy Apps
    • Overview
    • Flow Builder
      • Nodes (Functions)
        • Inputs
        • Trigger
        • Output
      • Flows
      • Function Extensions
        • Modifier
        • Filter
        • Error handler
        • Memorizer
      • Objects & Instances
      • Utilities
        • Basic Functions
        • PDF functions
        • Circular buffer
        • Timer
        • Counter
    • Integrations
      • Protocol Connectors
        • GraphQL
        • HTTP/REST
        • MQTT
        • OPC UA
          • Heidenhain PLCs with OPC UA
        • RS-232/485
        • Siemens S7
      • Data Connectors
        • File
        • Relational Database
        • Time Series Database (WIP)
      • API Connectors
        • OGC SensorThings API
        • Operating System
        • Zebra RFID IoT Connector
      • Agent / (Edge Connector)
      • Calling Custom Code
    • UI Builder
      • Input Widgets
        • Form
        • File Upload
        • Photo
        • Signature
        • Barcode / QR-Code (WIP)
        • Document Scan (WIP)
      • Display Widgets
        • Chart
        • Chat
        • Circular Gauge
        • Data Grid
        • Linear Gauge
        • Map
        • Media View
        • Progress Bar
        • Sparkline
        • Status Lamp
        • Toast
        • Value Box
        • Kanban Board
        • Data Tiles
        • Pie Chart
        • Sankey
      • Buttons
      • Text Box
      • Images
      • Icons
    • Communication Interfaces
      • Email Notifications
      • OPC UA Server
    • Data & File Storage
      • Internal InfluxDB
      • Internal PostgreSQL
      • File Server
    • App Appearance
      • Pages
      • In-App Navigation
      • Screens & Devices
      • Theming
    • Simulation & Testing
      • Simulating Events
      • Simulating Data
    • PDF Templates
    • RAG-based Chatbot
    • Deployment
  • Manage Apps
    • Overview
    • Manage Apps
      • General Settings
      • Users and Access
      • Distribution & Versioning
    • Manage Integrations
    • Manage Account
      • Account Structure
      • Members
      • Workspaces
  • TUTORIALS
    • Build Your First Heisenware App
  • Connect Heidenhain CNC with OPC UA Support
  • Related links
    • Website
    • Privacy policy
    • Imprint
Powered by GitBook
On this page
  • Send emails with internal emailer
  • Configure send function
  • Example
  • Demo video
  • Connect your own SMTP server
  • Configure custom emailer
  • Send emails with custom emailer
  1. Build & Deploy Apps
  2. Communication Interfaces

Email Notifications

Last updated 6 months ago

Email allows you to send custom emails directly from your apps logic.

You can either use the internal email server, sending emails from no-reply@heisenware.com, or connect your own SMTP server to send emails using a custom sender address.

Send emails with internal emailer

Use the send function to send an email from the internal email server. It will use the no-reply@heisenware.com as sender address.

Configure send function

The send function allows you to define the recipients address, subject, content and attachments. All inputs except the address can be filled dynamically. The send function can be triggered by any event or action.

Address configuration

Parameter
Type
Description

from:

string

The email address of the sender. Can be plan email address or formatted as Sender Name sender@server.com.

to:

string

Comma-separated list or an array of recipients email addresses.

cc:

string

Comma-separated list or an array of recipients email addresses to be CC'd.

bcc:

string

Comma-separated list or an array of recipients email addresses to be BCC'd.

Subject and content configuration

Both, subject and content, expect a string and don't require any further inputs but the actual string.

Attachment configuration

Parameter
Type
Description

filename:

string

Name of the attached file using Unicode.

content:

string, buffer or stream

The actual attachment as string, buffer or stream.

path:

string

Path of the file if you are using stream as content.

href:

string

URL of the file as alternative to path.

httpHeaders:

string

Optional HTTP headers to pass on with the href request, e.g., {authorization "bearer ..."}.

cid:

string

Optional content ID for using inline images in HTML message source.

By using an array in the attachment box you can attach more than one file to an email.

Example

In the example below, the subject, content and attachments are dynamically filled from a form and a file uploader, while the recipients address is predefined. A button triggers the send function.

This is how the email looks like:

Demo video

Connect your own SMTP server

To send emails from a custom email address, you need to connect to an SMTP server. Use the create function to establish this connection.

Configure custom emailer

After entering all required information, trigger the create function to create the emailer.

Hover above the arrow icon of each input box to understand what to fill into the boxes.

Name

Enter a unique name for the emailer into the first, yellow box.

Options

Enter the connection data for your SMTP server.

Parameter
Type
Description

host:

string

Hostname or IP address to connect to.

port:

integer

The port to connection to. Defaults to 587 if secure is false and to 465 if true.

secure:

boolean

If true, the connection will use TLS when connecting to the server. If false then TLS is used if the server supports the STARTTLS extension. Defaults to false.

ignoreTLS:

boolean

Set to true to disable TLS even if secure is false and the server supports STARTTLS extension.

requireTLS:

boolean

Set to true to try starting STARTTLS via Nodemailer. If the connection can't be encrypted, the message won't be sent.

Auth

Authentication with the SMTP server can be done with username and password or OAuth 2.0.

Username and password

Parameter
Type
Description

user:

string

The username. Typically, the users email address.

pass:

string

The password for the user.

OAuth 2.0

Parameter
Type
Description

type:

string

Defaults to login. Set to oauth2 to activate OAuth2.0 authentication.

_faClientId:

string

The registered client ID of the application.

_faClientSecret:

string

The registered client secret of the application.

refreshToken:

string

An optional refresh token. If provided, Nodemailer tries to generate a new access token if the existing one expires or fails.

accessToken:

string

The access token for the user. Only required if no refreshToken is available and there is no token refresh callback specified.

expires:

string

An optional expiration time for the current accessToken.

accessUrl:

string

An optional HTTP endpoint for requesting new access tokens. Defaults to Gmail.

serviceClient:

string

The required service client ID. To be found in the field client_id in the service key file.

privateKey:

string

The required private key. To be found in the file private_key in the service key file.

Defaults

With defaults, you can define defaults for each email send with the emailer. For example, a default sender address can be defined. The defaults box expects data as object.

Send emails with custom emailer

After your SMTP server is connected, you can use the of this server accordingly. It will appear right below the internal email.

send function
Email options
create function
Custom email server