Skip to content

Adapter - Email Sender

This page describes version 2.0.13 of the adapter.

Overview

The Email Sender adapter allows you to send emails via the Workflow Engine.

This adapter supports SMTP email only. The connection between adapter and SMTP server can be secured and authenticated.

All email address parameters accept multiple addresses with a comma separated list. At least one address must be specified for one of the to, cc or bcc parameters.

Email contents can be text or HTML. You may optionally include:



Properties

Name Display Is Required Comments Type Default Value Maximum Value Minimum Value Maximum Length Minimum Length
smtpserver SMTP Server Address True The address of the SMTP server e.g. smtp.gmail.com string 1024
port SMTP Server Port True The port number to connect to the SMTP server, typically 587 for secure connections. integer 587 65535 1
ssl Use secure connection to SMTP server (TLS) False boolean true
from From Address False From address for emails that are sent; if empty, adapter uses the username field as the 'From' address. string 1024
username Username False Username required for authentication with SMTP server; this will also be used as the 'From' address when sending emails string 1024
password Password False Password required for authentication with SMTP server password 100
maxattachmentsize Maximum attachment size (MB) False The maximum size of file in megabytes which can be sent as an attachment. If the size is greater than that, adapter will throw an error integer 2 5 1



Commands

Send email without attachments (sendsimpleemail)

Sends a simple email message, as plain text or HTML

Request Properties

Name Display Description Is Required Type
to To The 'To' address of the email. At least one address (To, CC or BCC) is required False string
cc CC The 'CC' address of the email. At least one address (To, CC or BCC) is required False string
bcc BCC The 'BCC' address of the email. At least one address (To, CC or BCC) is required False string
subject Subject The subject of the email False string
textbody Text Body The email body, for plain text messages False string
htmlbody HTML Body The email body, for HTML messages False string
importance Importance The email priority, one of: low, normal or high False string

Response Properties

Name Description Type
success 'true' if the email was sent successfully. string
codenum '1' No recepients found in parameters. '2' Failed to connect to SMTP server. '3' SMTP authentication failed. '4' Failed to send a mail. string

Send Email with attachments (sendcomplexemail)

Sends an email with one or more attachments and/or a meeting request

Request Properties

Name Display Description Is Required Type
to To The 'To' address of the email. At least one of these (To, CC or BCC) request properties should be provided. False string
cc CC The 'CC' address of the email. At least one of these (To, CC or BCC) request properties should be provided. False string
bcc BCC The 'BCC' address of the email. At least one of these (To, CC or BCC) request properties should be provided. False string
subject Subject The subject of the email False string
textbody Text Body The email body, for plain text messages False string
htmlbody HTML Body The email body, for HTML messages False string
importance Importance The email priority, one of: low, normal or high False string
attachment Attachments Attachments to include in the email False array
attachment[0].name Attachment Name The name of the attachment file, including the extension True string
attachment[0].data Attachment Data The attachment file data, either plain text or base64-encoded as indicated by Attachment Data Type True string
attachment[0].datatype Attachment Data Type The type of the attachment data, either base64 or string. Default is base64 False string
attachment[0].contenttype Attachment Content Type The media type of the attachment, e.g. image/png, text/plain, text/csv, application/pdf. Default is application/octet-stream False string
attachment[0].isinlineattachment Is Inline Attachment Whether to show the attachment in the HTML email body. Default is false False boolean
meetingdata.name Meeting Name The name of the meeting. Mandatory when setting up a new meeting False string
meetingdata.subject Meeting Subject The subject of the meeting False string
meetingdata.location Meeting Location The location of the meeting False string
meetingdata.start Meeting Start The start date time of the meeting. Mandatory when setting up a new meeting False string
meetingdata.end Meeting End The end date time of the meeting. Mandatory when setting up a new meeting False string

Response Properties

Name Description Type
success 'true' if the email was sent successfully. string
codenum '1' No recepients found in parameters. '2' Failed to connect to SMTP server. '3' SMTP authentication failed. '4' Failed to send a mail. string

Attachments

When using sendcomplexemail command, you may include one or more attachments. While it is possible to include raw files as a base64-encoded string, the attachment file data should usually be supplied through a workflow property.

When adding an attachment, make sure the attachment content type contains a media type that matches the type of file you're attaching. For example, use image/png for an image file, text/plain for a text file, application/pdf for a PDF file and so on.

Maximum attachment size is 2 MB. You can increase this limit in the adapter configuration up to 5 MB.

Meeting request

The sendcomplexemail command allows requesting a meeting. To achieve this, the command creates an iCalendar (*.ics) file using the information and includes as an attachment in the email.

Release History

Version Type Description Tracking # Date
2.0.1 Initial First release in the Adapter Type store.
2.0.8 Bug fix Emails with attachments failed to send in some cases. NAP-14541
2.0.10 Bug fix Corrected help text for 'port' field and changed default port to 587 NAP-13759
2.0.11 Maintenance Updated third-party components and improved maintainability. NAP-11518
2.0.12 Maintenance Updated third-party components and improved maintainability. NAP-23945 2022-11-29
2.0.13 Maintenance Updated third-party components and improved maintainability. NAP-27635 2024-07-31

Categories