Email notifications
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
Option | Data type | Description |
---|---|---|
| string | The email address of the sender. Can be plan email address or formatted as |
| string | Comma-separated list or an array of recipients email addresses. |
| string | Comma-separated list or an array of recipients email addresses to be CC'd. |
| 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
Option | Data type | Description |
---|---|---|
| string | Name of the attached file using Unicode. |
| string, buffer or stream | The actual attachment as string, buffer or stream. |
| string | Path of the file if you are using stream as content. |
| string | URL of the file as alternative to path. |
| string | Optional HTTP headers to pass on with the href request, e.g., |
| 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.
Option | Data type | Description |
---|---|---|
| string | Hostname or IP address to connect to. |
| integer | The port to connection to. Defaults to 587 if |
| boolean | If |
| boolean | Set to |
| boolean | Set to |
Auth
Authentication with the SMTP server can be done with username and password or OAuth 2.0.
Username and password
Option | Data type | Description |
---|---|---|
| string | The username. Typically, the users email address. |
| string | The password for the user. |
OAuth 2.0
Option | Data type | Description |
---|---|---|
| string | Defaults to |
| string | The registered client ID of the application. |
| string | The registered client secret of the application. |
| string | An optional refresh token. If provided, Nodemailer tries to generate a new access token if the existing one expires or fails. |
| string | The access token for the user. Only required if no |
| string | An optional expiration time for the current |
| string | An optional HTTP endpoint for requesting new access tokens. Defaults to Gmail. |
| string | The required service client ID. To be found in the field client_id in the service key file. |
| 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 send function of this server accordingly. It will appear right below the internal email.
Last updated