Notifications
Sending email messages from the Stubber platform.
Stubber makes it trivial to send emails to users or systems from the platform. Simply add an email notification with the desired parameters to an action and the email will be sent to the recipient. Conditions can be used to control when the email is sent.
By default, the email will be sent from an email address associated with the stub where the action ran (eg. 2024-11-11-ABCD@stubber.email),
however, it is possible to configure custom mailboxes, such as orders@my_org.stubber.emails or support@my_org.stubber.emails.
A custom email layout can also be created on Stubber Editor to send emails with a custom design. The custom layout can be selected in the relevant parameter.
Outgoing vs Incoming Email
While it is easy to send a notification to send an email, it is also possible to receive emails on the Stubber platform.
This is achieved by using a feedback action that is triggered when an email is sent to a stub.
To learn more on how to use the _update_from_email Feedback Action see this page.
See the Update From Email Feedback Action for more information on how to receive emails on the Stubber platform.
Create send action
- Setup a notification in an action as seen below
Parameters
subject required string
The subject of the email.
message required string
The body of the email.
without_templates optional boolean
default : false
Instructs for the email to be sent without any formatting template applied.
custom_email_settings optional object
This parameter is used to specify custom email settings such as the reply_to address, the format settings, and the org_mailbox settings to use.
Show child attributes
reply_to optional object
Override the default reply-to address for the email.
format optional object
Parameters related to the formatting of the email, such as the email layout to use. See Create Email Layout for more information.
Show child attributes
layoutuuid optional string
The globally unique identifier of the email layout to use.
mailbox optional object
Parameters related to the mailbox to use. See Create Email Mailbox for more information.
Show child attributes
mailboxuuid optional string
The globally unique identifier of the mailbox to use.
enable_lids optional boolean
This parameter can be set to true to enable the lids feature for the outgoing email message.
attachments optional array
An array of objects containing file meta data. This should include fileuuid as a minimum.
Show child attributes
fileuuid required string
The globally unique identifier of the file in the Stubber platform.
filename required string
A descriptive name for the file
Example
See Attachments for related info
Result

Examples
In all these examples, standard substitution techniques to pull in values from stub or stubpost data can be deployed.
Attach Single File (full JSON Structure)
When attaching a file building out the full JSON Structure:
Attaching using File structure
When attaching a file / files using the existing files JSON structure from stub.data
Consider data structure of a file field in the stub.
You can attach the file as follows:
This works as the substitution brings in the entire array at the path of ~~stub.data.files resulting in the same JSON structure.
If the ~~stub.data.files array contains multiple object referring to multiple files, each file will be attached.
Custom reply to address
Send emails with a different reply address than the sending address
In the notification library add Email with custom reply to address
The reply email is specified in email_out_contactuuid.platforms.email.custom_email_settings.reply_to
Reply to cc addresses
Add parameter reply_all to custom_email_settings to reply to all email addresses in the previous incoming email