Email - Create Session

Declaration

<AMEMAIL ACTIVITY="create_session" SESSION="text" 
PROTOCOLTYPE="text (options)" SERVER="text" PORT="number" 
DISABLECHUNKING="YES/NO" TIMEOUT="number" 
SECURITY="text (options)" CERTIFICATE="text" 
CERTIFICATEPASSPHRASE="text (encrypted)" 
IGNOREINVALIDCERTIFICATE="YES/NO" 
PROXYTYPE="text (options)" PROXYSERVER="text" 
PROXYPORT="number" />

Description: Creates a session in which to attach related activities to. This enables a single task the ability to execute numerous email related operations simultaneously bound by each session.

Practical Usage

Commonly used as a means of organizing and encapsulating a collection of related activities required to accomplish a particular task or process. The use of sessions can ensure consistency and eliminate redundancy.

Server Parameters

Property

Type

Required

Default

Markup

Description

Protocol

Text (options)

Yes

SMTP

  1. PROTOCOLTYPE="POP3"

  2. PROTOCOLTYPE="SMTP"

  3. PROTOCOLTYPE="IMAP"

  4. PROTOCOLTYPE="WEBDAV"

  5. PROTOCOLTYPE="EWS"

The type of email protocol to connect to. This parameter is available only if the Custom server settings parameter is enabled. Different parameters become available depending on which option is chosen. The available options are:

  • SMTP (default) - Simple Mail Transfer Protocol is an Internet standard for email transmission across IP networks.

  • POP3 - An application-layer Internet standard protocol used by local email clients to retrieveemailfrom a remoteserver over a TCP/IP connection.POP3 allows you to download email messages on your local computer and read them even when you are offline.

  • IMAP - Internet Message Access Protocol is a mail protocol used for accessing email on a remote web server from a local client.

  • WebDAV (Exchange 2003, 2007) - World Wide Web Distributed Authoring and Versioning) is the Internet Engineering Task Force standard for collaborative authoring on the Web.

  • EWS (Exchange 2007 & newer, Online) - Exchange Web Services provides the functionality to enable client applications to communicate with the Exchange server. EWS provides access to much of the same data that is made available through Microsoft Outlook. EWS clients can integrate Outlook data into Line-of-Business (LOB) applications.

Session

Text

Yes

EmailSession1

SESSION="emailSess1"

The name of the Email session to create. Several Email activities can be linked to a single session, eliminating redundant data entry and making tasks more organized. Numerous sessions can exist in a single task and run parallel with one another, increasing overall efficiency. The default value for this parameter is 'EmailSession1'.

Server

Text

Yes

(Empty)

SERVER="mail.server.com"

The SMTP server that should be used to send the message. This parameter is available only if the Protocol parameter is set to SMTP, POP3 or IMAP.

Port

Number

No

25

PORT="3333"

The port that should be used when connecting to the SMTP server. Most SMTP servers run on port 25 (default port number) however, this parameter can be customized to connect to another port. This parameter is available only if the Protocol parameter is set to SMTP, POP3 or IMAP.

Security

Text (options)

Yes

No security

  1. SECURITY="NONE"

  2. SECURITY="EXPLICI"

  3. SECURITY="IMPLICIT

The type of security that this action should use. This parameter is available only if the Protocol parameter is set to SMTP, POP3 or IMAP. The available options are:

  • No Security (default) - Specifies that no security will be administered.

  • Explicit TLS/SSL - Indicates that Explicit Transport Layer (TLS) and Secure Sockets Layer (SSL) security will be administered.

  • Implicit TLS/SSL - Indicates that Implicit Transport Layer (TLS) and Secure Sockets Layer (SSL) security will be administered.

Current folder

Text

No

Inbox

CURRENTFOLDER="inbox"

Specifies the current mailbox folder that this activity should be performed on. The default value is Inbox. To denote other Exchange well-known folders (e.g., Calendar, Drafts, Tasks, etc.) enter the Exchange property name for that folder. To specify subfolders, use a "/" (e.g., Inbox/SubFolderName). For more details regarding Exchange "well-known" folders, see the Additional Notes section below.

Use Authentication

---

---

---

---

If enabled, authentication will take place during the transmission. This parameter is available only if the Protocol parameter is set to SMTP.This is a design time parameter and therefore contains no markups. It is disabled by default.

Authentication Type

Text (options)

Yes if Authentication is enabled

(Empty)

  1. AUTHTYPE="plain"

  2. AUTHTYPE="DigestMD5"

  3. AUTHTYPE="CramMD5"

  4. AUTHTYPE="Login"

  5. AUTHTYPE="ClearText"

  6. AUTHTYPE="APOP"

  7. AUTHTYPE="NTLM"

  8. AUTHTYPE="GSSapi"

Specifies the authentication type to administer. The following options are:

  • Auto (default) - Advanced Workflows will automatically determine the authentication type being used.

  • Plain - Consists of a single message from the client to the server. The client sends the authorization identity (identity to login as), followed by a US-ASCII NULL character, followed by the authentication identity (identity whose password will be used), followed by a US-ASCII Null character, followed by the clear-text password. The client may leave the authorization identity empty to indicate that it is the same as the authentication identity."

  • DigestMD5 - An algorithm that is used to verify data integrity through the creation of a 128-bit message digest from data input (which may be a message of any length) that is claimed to be as unique to that specific data as a fingerprint is to the specific individual.During a DIGEST-MD5 authentication exchange between a client and the server, there is additional information passed which is used to construct a more robust hashing algorithm when compared against a CRAM-MD5 authentication making it more difficult to decipher.

  • CramMD5 - Challenge Response Authentication Mechanism is similar to DIGEST-MD5 in that it verifies data integrity through the creation of a 128-bit message digest.

  • Login - Authentication through logon credentials.

  • Cleartext - Transmitted or stored text that has not been subjected to encryption and is not meant to be encrypted. As such, cleartext does not require decryption to be displayed.

  • APOP - Authenticated Post Office Protocolpermits a client computer to retrieve email from a Post Office Protocol (POP) server while providing authentication technology that includes password encryption upon client receipt.

  • NTLM - Abbreviation for "Windows NT LAN Manager." NTLM is the default for network authentication in the Windows NT 4.0 operating system.

  • Gossipy - The Generic Security Service Application Program Interface is an application programming interface for programs to access security services.

  • OAuth20 - Provides a method for clients to access server resources on behalf of a resource owner (such as a different client or an end-user). It also provides a process for end-users to authorize third-party access to their server resources without sharing their credentials (typically, a username and password pair), using user-agent redirections.

Domain name

Text

Yes if Use Authentication is set to YES

(Empty)

DOMAINNAME="my.domain.com"

The domain name to authenticate with. This parameter is available only if the Use Authentication parameter is selected.

Username

Text

Yes if Authentication is enabled

(Empty)

USERNAME="theuser"

The user name to use to logon to the mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is selected.

NOTE: The From address entered should belong to the authenticated user.

Password

Text

Yes if Authentication is enabled

(Empty)

CERTIFICATEPASSPHRASE=

"encrypted"

The password used to logon to the mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is selected.

Certificate

Text

Yes if Use Authentication is set to YES.

No

CERTIFICATE=

"c:\folder\certname.pfx"

The full path and filename of the certificate (.cer or .pfx extension) used to authenticate with. This parameter is available only if the Security parameter is set to Explicit TLS/SSL or Implicit TLS/SSL.

If the Protocol selected is  Exchange 2003 (WebDav), Exchange 2007 (EWS) or Exchange 2010 (EWS), the following parameters are available:

Exchange Server

Text

Yes

(Empty)

SERVER=

"https://www.server.com"

The Exchange server that should be used to send the message. This parameter is available only if the Protocol Type parameter is set to Exchange 2003 (WebDav), Exchange 2007 (EWS) or Exchange 2010 (EWS).

Autodiscover service URL

Yes/No

No

No

AUTODISCOVERURL="yes"

The Autodiscover service configures and maintains server settings for client computers that are running Microsoft Office Outlook 2007 and supported mobile devices. It provides access to Microsoft Exchange features for Outlook 2007 clients that are connected to your Microsoft Exchange messaging environment. If this parameter is set to YES, specifies that Autodiscover service requests will be performed. This parameter is set to NO by default and is only available if the Protocol Type parameter is set to Exchange 2007 (EWS) or Exchange 2010 (EWS).

Allow redirection

Yes/No

No

No

AUTODISCOVERURL="yes"

If set to YES, redirection (or mail forwarding) to another server will be allowed. This parameter is set to NO by default and is only available if the Protocol Type parameter is set to Exchange 2007 (EWS) or Exchange 2010 (EWS).

Ignore invalid server certificates

Yes/No

No

No

IGNOREINVALIDCERTIFICATE=

"yes"

If set to YES, invalid or expired SSL server certificates that are detected will be ignored. If set to NO and an invalid server certificate is found, this step will throw an error stating that the security certificate on the server is not valid. This parameter is set to NO by default and is only available if the Protocol Type parameter is set to Exchange 2007 (EWS) or Exchange 2010 (EWS).

Use Authentication

If enabled, authentication will take place during the transmission. The following parameters become available. Note that this is a design time parameter and therefore contains no markups. It is disabled by default.

Authentication Type

Text (options)

No

(Empty)

AUTHTYPE="form"

Specifies the authentication type to administer. The following options are:

  • Basic

  • Default

  • Form (WebDav only)

Username

Text

Yes if Use Authentication is set to YES.

(Empty)

USERNAME="theUser"

A valid user name used to logon to the mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is set to YES.

NOTE: The From address entered should belong to the authenticated user.

Password

Text

Yes if Use Authentication is set to YES.

(Empty)

PASSWORD="encrypted_text"

A valid password used to logon to the mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is set to YES.

NOTE: The From address entered should belong to the authenticated user.

Advanced Parameters

Property

Type

Required

Default

Markup

Description

Disable chunking and pipelining for antivirus

Yes/No

No

No

DISABLECHUNKING="YES"

If set to YES, chunking and pipelining will be disabled (set to NO by default). This parameter is available only if the Protocol Type parameter is set to SMTP.

Chunking refers to the ability to allow inconveniently large messages to be broken into conveniently-sized smaller chunks. Pipelining reduces the time it takes to send multiple messages. A sending server would use pipelining to send all the messages it has to a receiver in one go. It simply sends all the commands "down the pipe" without waiting for a response from the remote server. Once all the commands have been received, only then will the remote server issue all its responses at once. Chunking and pipelining can possibly speed up transmissions.

NOTE: Some anti-virus programs may cause e-mail transmission issues when chunking and pipelining is enabled.

Current folder

Text

No

Inbox

CURRENTFOLDER="inbox"

Specifies the current mailbox folder that this activity should be performed on. The default value is Inbox. To denote other Exchange well-known folders (e.g., Calendar, Drafts, Tasks, etc.) enter the Exchange property name for that folder. To specify subfolders, use a "/" (e.g., Inbox/SubFolderName). For more details regarding Exchange "well-known" folders, see the Additional Notes section below.

NOTE: If the Protocol parameter is set to SMTP or POP3, this parameter is disabled.

Timeout (seconds)

Number

No

60

TIMEOUT="120"

The specified period of time (in seconds) that will be allowed for a connection to occur before a timeout occurs. The default value is 60 seconds.

Proxy type

Text (options)

No

System default

  1. PROXYTYPE="socks4"

  2. PROXYTYPE="socks4a"

  3. PROXYTYPE="socks5"

  4. PROXYTYPE="http"

The proxy protocol that should be used. If you are unsure of the value to use in this parameter, contact your network administrator. The available options are:

  • System default

  • None

  • Socks4

  • Socks4a

  • Socks5

  • HTTP

Proxy server

Text

No

(Empty)

PROXYSERVER="proxy.host.com"

The hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

Proxy port

Number

No

1028

PROXYPORT="3000"

The port that should be used to connect to the proxy server. Most proxy servers operate on port 1028 (the default) however the proxy server can be customized to operate on other ports

Proxy username

Text

No

(Empty)

PROXYUSERNAME="username"

The username that should be used to authenticate when connecting through the proxy server. This option is only valid if the Use authentication parameter is enabled.

Proxy password

Text

No

(Empty)

PROXYPASSWORD="encrypted"

The password that should be used to authenticate when connecting through the proxy server. This option is only valid if the Use authentication parameter is enabled.

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Well-Known Mailbox Folders

Each user's mailbox folder has a set of properties that you can use to retrieve well-known folders such as Inbox, Calendar, Drafts, and Tasks. Specifying a subfolder requires the name of the appropriate folder from the well known folders level as the parent folder and use of a "/" sign as a delimiter (e.g., Inbox/SubFolderName). To specify a folder that you created in the well known folders level, you must specify the root of the message folder hierarchy (e.g., MsgFolderRoot/SubFolderName). The table below defines common folder names (in alphabetical order) that are used in users' mailboxes.

Name

Description

ArchiveDeletedItems

The Deleted Items folder in the archive mailbox.

ArchiveMsgFolderRoot

The root of the message folder hierarchy in the archive mailbox.

ArchiveRecoverableItemsDeletions

The root of the folder hierarchy of recoverable items that have been soft-deleted from the Deleted Items folder of the archive mailbox.

ArchiveRecoverableItemsPurges

The root of the hierarchy of recoverable items that have been hard-deleted from the Deleted Items folder of the archive mailbox.

ArchiveRecoverableItemsRoot

The root of the Recoverable Items folder hierarchy in the archive mailbox.

ArchiveRecoverableItemsVersions

The root of the Recoverable Items versions folder hierarchy in the archive mailbox.

ArchiveRoot

The root of the folder hierarchy in the archive mailbox.

Calendar

The Calendar folder.

Contacts

The Contacts folder.

DeletedItems

The Deleted Items folder.

Drafts

The Drafts folder.

Inbox

The Inbox folder.

Journal

The Journal folder.

JunkEmail

The Junk E-mail folder.

MsgFolderRoot

The root of the message folder hierarchy.

Notes

The Notes folder.

Outbox

The Outbox folder.

PublicFoldersRoot

The root of the Public Folders hierarchy.

RecoverableItemsDeletions

The root of the folder hierarchy of recoverable items that have been soft-deleted from the Deleted Items folder.

RecoverableItemsPurges

The root of the folder hierarchy of recoverable items that have been hard-deleted from the Deleted Items folder.

RecoverableItemsRoot

The root of the Recoverable Items folder hierarchy.

RecoverableItemsVersions

The root of the Recoverable Items versions folder hierarchy in the archive mailbox.

Root

The root of the mailbox.

SearchFolders

The Search Folders folder, also known as the Finder folder.

SentItems

The Sent Items folder.

Tasks

The Tasks folder.

Voicemail

The Voicemail folder.

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

Create email session "EmailSession2". Use SMTP protocol. Server is "mail.server.com".

<AMEMAIL 
		 ACTIVITY="create_session" SESSION="EmailSession2" 
		 PROTOCOLTYPE="smtp" SERVER="mail.server.com" 
		 PORT="25" DISABLECHUNKING="YES" AUTHTYPE="Login" 
		 USERNAME="user" PASSWORD="AM4Mfl170Nxovj/XVxvVX9Fxw==aME" 
		 SECURITY="explicit" PROXYTYPE="none" />