POP3 Icon

Get Email - Get All Headers

Declaration

<AMGETEMAIL RESULTDATASET="text" PROTOCOLTYPE="imap" SERVER="text" PORT="number" CURRENTFOLDER="text" TIMOUT="number" USERNAME="text" PASSWORD="text" SECURITY="text (options)" CERTIFICATE="text" CERTIFICATEPASSPHRASE="text" IGNOREINVALIDCERTIFICATE="yes/no" />

See Also

Get Email - Delete Messages | Get Email - Delete Single Message | Get Email - Get Messages | Get Email - Get Single Message | Send Email | Send IM

Description

Retrieves all message headers (Subject, Date, To and From information) and populates a dataset with the results. This is a fast and efficient way to determine what is on the server without downloading potentially large message bodies and/or attachments.

Practical Usage

Commonly used to save all message headers into a dataset. The dataset can be looped through for further processing.

Parameters

Email Properties

Property

Type

Required

Default

Markup

Description

Create and populate dataset

Text

Yes

(Empty)

RESULTDATASET="theData"

The name of the dataset in which to create and populate with the retrieved headers.

Remove mail from server

Yes/No

Yes

(Empty)

REMOVEMESSAGE="yes"

If set to YES, specifies that mail will be permanently removed from the serve. This parameter is set to NO by default.

Server Properties

Property

Type

Required

Default

Markup

Description

Protocol

Text (options)

Yes

SMTP

PROTOCOLTYPE="SMTP"

The protocol type 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:

  • POP3 (Default)

  • SMTP

  • Exchange 2003 (WebDav)

  • Exchange 2007 (EWS)

  • Exchange 2010 (EWS)

If the Protocol selected is POP3 or SMTP, the following parameters become available.

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.

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.

Security

Text (options)

Yes

No security

SECURITY="EXPLICIT"

The type of security that this action should use. This parameter is available only if the Protocol parameter is set to SMTP. 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 (i.e. Calendar, Drafts, Tasks, etc.) enter the Exchange property name for that folder. To specify subfolders, use a "/" (i.e. Inbox/SubFolderName). For more details regarding Exchange "well-known" folders, see the Additional Notes section below.

Authentication type

Text (options)

No

Auto

AUTHENTICATIONTYPE="NTLM"

If set to YES, indicates that a username/password is used to authenticate with the server. Other parameters become available if this parameter is set to YES. Set to NO by default.

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 Use Authentication is set to YES.

(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 Use Authentication is set to YES.

(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="encryptedtext"

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.

Proxy Properties

Property

Type

Required

Default

Markup

Description

Proxy type

Text (options)

No

System default

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 host

Text

No

(Empty)

PROXYSERVER="proxy.host.com"

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

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.

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

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

 

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Pop3 E-mail. Retrieve all headers from "mail.server.com". User name "user". Store in dataset "theDataset".

<AMGETEMAIL RESULTDATASET="theDataset" SERVER="mail.server.com" USERNAME="user" PASSWORD="AM2SEnYdJUXvbJISdh0lRevslpJuXTmF9ywaME" />

↑ Top of Page