Create Email Attachment Activity

Description

The Create Email Attachment activity is used to create attachments from byte content that can be consumed by the Send Email activity.

Usage

First, the Read File Bytes activity could be used to get the bytes of a data file on the server. The byte content could then be passed to the Create Email Attachment activity, and the Content Type and Filename inputs could be set appropriately for the attachment's data type. The attachment output can then be passed to the Send Email activity to be sent along with an email.

Environment

The Send Email activity is a server activity. It can only be used in server workflows, which require on-premises Workflow.

Offline Support

This activity does not work when the device is offline.

Inputs

Content

Required

Type: Number Array

The byte content of the attachment.

Bytes are the raw binary values that represent content. A byte array is represented by a list of numbers between 0 and 255.

Providing empty or invalid content will cause an error.

Content Type

Optional

Type: "application/json" | "application/octet-stream" | "application/pdf" | "application/xml" | "application/zip" | "image/jpeg" | "image/png" | "text/csv" | "text/html" | "text/plain" | String

The MIME type of the content. This input will determine how the content is served to the user. For example, PDF ("application/pdf") and text ("text/plain") files will be displayed, whereas CSV ("text/csv") files will be downloaded.

Workflow Server supports any MIME type that is registered with the Internet Assigned Numbers Authority (IANA) and implemented by Microsoft's FileExtensionContentTypeProvider.The full list of MIME types registered with IANA can be found here.

If the Content Type input is blank or invalid, the MIME type will be determined from the file extension in the Filename input.

More information about MIME types can be found here.

Filename

Required

Type: String

The full name (with the extension) that the file will be saved as when the user downloads it.

A filename that is too long, empty, or has invalid characters, such as slashes or colons, will cause an error. Filenames with executable extensions, such as ".exe", will cause an error as these file types are a security risk to the end user.

Outputs

result

Type: Object

The attachment object. This object should be passed to the Send Email activity.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.12