Documentation forTask Factory

Task Factory Email

Email Connection Manager

The Task Factory Email Connection Manager is used with Advanced Email and SMS Task, Email Source and Email Source Delete or Move Message Task.

General Tab

Task Factory Email Connection Manager General tab

Server Information

Option Description
Protocol Type

The protocol used to read or send email messages. There are three protocols available:

  • POP3 - Read only
  • IMAP - Read Only
  • SMTP - Send Only

Mail Server The address of the mail server.

Login Information

Option Description
User Name The user name for the email account. To use a domain account, enter the domain name and login (e.g. DOMAIN\User1)
Password The password for the email account.
Requires Secure Password Authentication (SPA) Some servers require SPA to be able to access the account.

Advanced tab 

The Advanced tab changes depending on which Protocol Type is selected in the General Tab.

Pop3

Task Factory Email Connection Manager Advanced tab

Server Port Information

Option Description
Server Port Port used to connect to the mail server specified in the general tab.
This server requires an encrypted connection (SSL) Some servers require a secure connection to access the POP3 mailbox.

Extra Settings

Option Description
Timeout in seconds The number of seconds before the connection manager will timeout connecting to the mail server.
Reuse Connection Option to maintain the original connection.

Note:  This option should be selected when the Advanced Email and SMS Task is used within the loop containers.

IMAP

Task Factory Email Connection Manager Advanced tab

Server Port Information

Option Description
Server Port Port used to connect to the mail server specified in the general tab.
Use the following type of encrypted connection

Some servers require a secure connection to access the IMAP mailbox. 

There are three available encryption types:
  • None (default)
  • SSL
  • TLS

Extra Settings

Option Description
Timeout in seconds The number of seconds before the connection manager will timeout connecting to the mail server.
Reuse Connection Option to maintain the original connection.

Folders

Option Description
Root Folder Path The folder on the IMAP server that contains the messages you want to download.

SMTP

Task Factory Email Connection Manager Advanced tab

Server Port Information

Option Description
Server Port Port used to connect to the mail server specified in the general tab
Use the following type of encrypted connection

Some servers require a secure connection to access the IMAP mailbox. 

There are three available encryption types:
  • None (default) 
  • SSL
  • TLS

Server Timeout

Option Description
Timeout in seconds
The number of seconds before the connection manager will timeout connecting to the mail server.
Reuse Connection
Option to maintain the original connection.

Email OAuth2 Connection Manager

The Task Factory Email OAuth2 Connection Manager is used with Advanced Email and SMS Task, Email Source and Email Source Delete or Move Message Task.

Connection Settings

Task Factory Email OAuth2 Connection Manager Connection Settings

Option Description
Client Id The Client Id of the Azure App that is found in your App's overview page on Office 365.

Additional Information: For information about configuring an app to access a web API see the following MSDN article
Client Secret The Client Secret of the Azure App that is found in your App's overview page on Office 365.
Access Token Select Get Token to open the Token Getter window.
Is Bearer Token Select this option if the Access Token is a bearer token.
Access Token Expiration Date The expiration date of the access token.
Note:  This setting is optional.
Security Protocol The Security Protocol used by the API. The Default option uses the TLS version used by your .NET version by default.  The following options are available:
  • Ssl3
  • Tls
  • Tls11
  • Tls12
Test Connection Select Test Connection to test your entered connection credentials.

Email OAuth2 Token Getter

Task Factory Email OAuth2 Token Getter

Option Description
Client Id The Client Id of the Azure App.
Note:  This field automatically populates with your entry on the Connection Settings tab.
Client Secret The Client Secret of the Azure App.
Note:  This field automatically populates with your entry on the Connection Settings tab.
Directory (tenant) ID The directory tenant id of the Azure app that is found in your App's overview page on Office 365.
Scopes Select the scope checkbox(es) that are applicable:
Open Idopenid
Profileprofile
Offline Accessoffline_access
Send SMTP Mailhttps://outlook.office.365.com/SMTP.send
Access Pop Mailhttps://outlook.office365.com/POP.AccessAsUser.All
Access IMAP Mailhttps://outlook.office365.com/IMAP.AccessAsUser.All

Port for response The port where the response for the token request will be sent to on your local machine.
Set your Redirect Uri to: Use this as your Redirect uri in your OAuth2 App settings.

Mail Settings Tab

Task Factory Email OAuth2 Connection Manager Connection Settings Mail Settings tab

Option Description
Mail Protocol
  • Protocol Type - The protocol used to read or send email messages. 
  • There are three protocols available:
    • POP3 - Read only
    • IMAP - Read Only
    • SMTP - Send Only
Server Address The server address of your email server.
User Name The username associated to your email server.

Advanced Tab

Task Factory Email OAuth2 Connection Manager Connection Settings Advanced tab

Option Description
Server Port Port used to connect to the client specified in Connection Settings.
Encryption Type The encryption method used by your email server. 
  • There are three available encryption types:
    • None (default) 
    • SSL
    • TLS
Timeout in Seconds The number of seconds before the connection manager will timeout connecting to the mail server.
Reuse Connection Select this checkbox to reuse the input connection. 

Headers

Task Factory Email OAuth2 Connection Manager Headers

You can create header names and values by entering the information in their corresponding windows. Select Add New Header to add a header. Select Remove header to remove a header.

Refresh Token

Task Factory Email OAuth2 Connection Manager Refresh Token

Option Description
Refresh Token Authentication information provided to you at the application's developer site.

Note:  This should match the API Key from the Connection Settings window.
Token Request Url The URL that returns a refresh token. Example: https://api.citrixonline.com/oauth/access_token
Headers Allows you to add headers within the refresh token. Select Add New Header to add a header. Select Remove header to remove a header.
Results Returned In Specifies how results are returned from the application (JSON, XML, or String.)
Access Token Path The token path for the access token. Example: access_token
Refresh Token Path The token path for the refresh token. Example: refresh_token
Group Index  Identifies the index position to return (0 based).
Note:  This option only appears if you selected String for the Results Returned In option.
Use Token Store This option creates a file on your machine that saves the access token, and refresh token in an encrypted format.
Token Store Id Identifies the Token Store Id.
Token Store Path (Optional) Identifies the Token Store path.

Client Certificate

Task Factory Email OAuth2 Connection Manager Client Certificate

Option Description
Use Client Certificate Select this checkbox to use the client certificate.
Certificate Store Location Select the certificate store location:
  • Current User
  • Local Machine
  • PFX File (Stored on disk)
Certificate Store Location Select the certificate store location:
  • AddressBook
  • AuthRoot
  • CertificateAuthority
  • Disallowed
  • My
  • Root
  • TrustedPeople
  • TrustedPublisher
Search For Certificate Enter a specific certificate to search for and select Find. Leave this field blank to view all certificates.
Certificate Thumbprint Enter the certificate thumbprint.

Proxy

Task Factory Email OAuth2 Connection Manager Proxy

Option Description
Proxy Host When connecting to an endpoint using a proxy, you should enter the proxy URL in this field.
Proxy Port The port number that corresponds to the URL proxy host.
Proxy User Name The username needed to authenticate to the proxy.
Proxy Password The password that allows you to authenticate to the proxy.

Advanced Options

Task Factory Email OAuth2 Connection Manager Advanced Options

Option Description
Ignore Ssl Certificate Verification Selecting this option ignores the SSL Certificate notification from the API during the connection.

Note:  This option applies to APIs that require you to have an SSL Certificate. Select this option if the SSL Certificate is not needed.
Follow Redirects Selecting this option implements a 301 redirect on configured endpoints. For example, this option would automatically send your request to an HTTPS redirect once the request has reached the HTTP version of the site.  

Configuring your Azure App for Email OAuth2 Connection Manager

Before connecting to your Azure App with the Email OAuth2 Connection Manager, you need to configure your settings in Azure Active Directory. Complete the following steps:

Additional Information: If you haven't configured an App to connect to your web API for the Email OAuth2 Connection Manager, see the following MSDN article for more information about configuring an app.

1. Login to Azure Active Directory, and go to App registrations.
Azure Active Directory App registrations

2. Select the Azure App you want to use for your connection.

3. Select Manage > API Permissions to open your App's permissions. Enable the appropriate scopes for your connection. In this example we have enabled the following:  IMAp.AcessAsUser.All, offline_access, openid, POP.AccessAsUser.All, profile, SMTP.Send, and User.Read.Office365 API Permissions for Task Factory Email OAuth2 Connection Manager

Configuring Email OAuth2 Connection Manager Example

After configuring your App and permissions in Azure Active Directory, you can configure your Email OAuth2 Connection Manager. Complete the following steps:

1. Add the Email OAuth2 Connection Manager to your package.

2. Copy the Application (client) ID from your Office365 App Overview page in the Client Id field.

Office365 App Overview Application (client) ID

3. Copy your client secret from your Office365 Certificates & secrets page in the Client Secret field.
Office365 Certificates & secrets

4. Select Get Token to open the Token Getter. 
Task Factory Email OAuth2 Connection Manager Get Token

5. Copy the Directory (tenant) ID from your Office365 App Overview page in the Directory (tenant) ID field.
Office365 App Overview Directory (tenant) ID

6. Select the checkbox(es) for the desired connection scopes, and then select Get Access Token.
Task Factory Email OAuth2 Token Getter Get Access Token

7. Enter your App's mail settings in the Mail Settings tab, and then select Ok to complete your connection.
Task Factory Email OAuth2 Connection Manager Mail Settings

Advanced Email and SMS Task

Task Icon Task Description
Task Factory Advanced Email and SMS Task Icon The Advanced Email and SMS Task is used to send multiple Email or SMS messages to multiple users at the same time.

Mail Settings 

Task Factory Advanced Email and SMS Task

Option Description
SMTP Connection
The email connection manager used to send the message.
Subject 
The subject of the email being sent.
From 
The email address being used to send the email.
To 
The email addresses or SMS addresses the email will be sent to.
Priority 
The message's level of importance.
CC
The carbon copy email addresses.
BCC
The blind carbon copy email address.
Message Source
The source of the message being sent.
  • Direct Input - Uses the message created in the HTML or Plain Text editor in the UI.
  • File - Uses the file in the File Connection Manager selected. You will be able to edit the file content within the UI. When you select the OK button the file contents are replaced with the contents within the HTML editor or Plain Text editor.
  •  Variable - Uses the text contained within the variable selected. The variable text can be edited within the UI. When the OK button is selected the variable contents are replaced with the contents within the HTML editor or the Plain Text editor.
Attachments
Attachments sent with the email. When using variable expressions to send more than one file, use a pipe delimiter or | to separate each file's path. (Example: C:\users\me\File1.txt|C:\users\me\File2.txt)
Use Plain Text Email
Selecting this checkbox will remove the HTML editor from the UI and add a Plain Text Editor.

Variable Window

The package level user variables and system variables can be used within the message being sent. The placeholder is replaced with the value of the variables. 

You can add a variable by selectingSentryOne Task Factory Copy Variable buttonto the right of the variable name and then pasting it into the message body.SentryOne Task Factory Advanced Email and SMS Task Copy Variable

To add variables to any of the Mail Settings options, select the Expressions button to open the Property Expression Editor. SentryOne Task Factory Advanced Email and SMS Task Expressions button

Select the desired property from the drop-down list, and then enter the expression. Select OK to save the expression(s).
SentryOne Task Factory Advanced Email and SMS Task Property Expressions Editor

Note:  Select the ellipsis to open the Expression Builder and build more complex expressions.
SentryOne Task Factory Advanced Email and SMS Task Expression Builder
Additional Information: See the Expressions article for more details on using this functionality.

Message Body Tab

Task Factory Advanced Email and SMS task Message Body tab

HTML Source Tab

Task Factory Advanced Email and SMS Task HTML Source

Use the HTML editor to edit the body of an HTML email.

Preview Tab

Task Factory Advanced Email and SMS Task Preview tab

Use the preview tab to see what your email or SMS looks like.

Email Source Delete or Move Messages Task

Task Icon Task Description
Task Factory Email Source Delete or Move Message Task Icon The Email Source Delete or Move Messages Task allows the user to move or delete messages downloaded using the Email Source. See the Email Connection Manager to learn more about setting up the connection manager.

Task Factory Email Source Delete or Move Messages Task

Option Description
Select Email Connection Manager (IMAP Only) Select or create a connection manager.
 Select Message IDs Variable  Choose the variable for the message ids.
Folder To move messages to Choose a folder to move messages to or leave blank to delete them.

Email Source

Source Icon Source Description
Task Factory Email Source Icon The Email Source allows you to setup the properties to read messages from a POP3/IMAP mailbox. You can setup filtering for the data coming in from the mailbox to prevent unwanted messages or to target specific messages. See the Email Connection Manager to learn more about setting up the connection manager.

Task Factory Email Source

Option Description
Email Connection Choose an existing Email Connection Manager or select Create New Connection.
Attachments Directory The attachments directory is where any attachments for email messages are stored. Download all attachments into a single selected directory. The location of each attachment is stored in the Attachments column of the Output.
 Messages Variable The messages variable is an object variable that can be used by the Delete or Move Messages Task which allows you to delete messages retrieved in the email source.

Columns

Column Name - All email source adapters include the following fields to be used by your package.

Column Name Description
Body 
The plain text version of the email.
BodyHTML 
The HTML version of the email.
Subject 
Subject of the email.
FromEmail 
Email address only of the person who sent the email.
DateSent 
The date the email was sent.
To 
Email address of the account the message was sent to.
Size 
The size in bytes of the message.
Priority 
The priority of the message.
Attachments 
The attachments of a message.
RelatedItems 
The items embedded into a message. Usually images in message footers.

Filter - The Email Source allows you to filter the data coming in from the source mailbox. There are different filters allowed for different data types.

Data type Usable Filters
String Columns
Allow Contains, Equals, Ends With and Start With filters.
Integer Columns
Allows Greater Than, Less Than, and Equal filters.
Data Columns
Allow After and Before filters.

 Condition Textbox - Here you can use variables to use with filtering.

Column Filtering

The Email Source allows you to filter the data coming from the source mailbox using simple expressions. There are different filters allowed for each data types:

Data Type Usable Filters
String Columns
Allows for the usage of the Contains, Equals, Ends With, and Starts With filters.
Integer Columns 
Allows for the usage of the Greater Than, Less Than, and Equals filters.
Date Columns
Allows for the usage of the After and Before filters.

Additionally, filters allow for the use of variables within the filter's condition textbox. This can be done by appending two ampersats (@@) to the front of the variable name. For instance, the variable named strFromEmail could be applied to the FromEmail column in the following manner: Task Factory Email Source Variables exampleAfter the filters are set, each row that contains a filter turns green and displays a pseudo-select statement that allows for a quick view of all of the filters that are set within the Email Source.

Examples

How To Connect To An Office 365 Shared Mailbox

See the support article How To Connect To An Office 365 Shared Mailbox Using TF – Email Source for an example of how to read messages from an Office 365 shared mailbox using the Email Source.

Passing a Variable for the "To" line of the Advanced Email/SMS Task

See the support article Task Factory - Passing a Variable for the "TO" line of the Advanced Email/SMS Task for an example of how to pass a variable using the Advanced Email and SMS task.