Email Notifications
Last updated
Last updated
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.
Use the send
function to send an email from the internal email server. It will use the no-reply@heisenware.com
as sender address.
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.
Parameter | 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. |
Both, subject and content, expect a string and don't require any further inputs but the actual string.
Parameter | 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.
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:
To send emails from a custom email address, you need to connect to an SMTP server. Use the create
function to establish this connection.
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.
Enter a unique name for the emailer into the first, yellow box.
Enter the connection data for your SMTP server.
Parameter | 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 |
Authentication with the SMTP server can be done with username and password or OAuth 2.0.
Username and password
Parameter | Type | Description |
---|---|---|
| string | The username. Typically, the users email address. |
| string | The password for the user. |
OAuth 2.0
Parameter | 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. |
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.
After your SMTP server is connected, you can use the send function of this server accordingly. It will appear right below the internal email.