Send E-mail Action

Declaration

<AMSMTPMAIL SUBJECT="text" HTML="yes/no" ATTACH="text" TO="text" CC="text" BCC="text" SERVER="text" PORT="number" FROM="text" REPLYTO="text" PROXYTYPE="text [options]" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text">text</AMSMTPMAIL>

See Also

 HTTP Download, HTTP Post, Open Web Page

Description

Sends e-mail messages including attachments using the SMTP/WebDav (Exchange Server) protocol.

Practical Usage

Used to send an e-mail message plain text or HTML formatted, with or without attachments, using SMTP or WebDav (Exchange Server) Protocol. Frequently system administrators will choose to use this action to perform system notifications or conveniently package data retrieved from any other source such as databases or web sites.

Parameters

General Tab

To

Text, Required
MARKUP: TO="webmaster@networkautomation.com"

Specifies the recipient(s) of the message. Multiple recipients must be separated by semi-colons (;).

The recipient parameter can be in any of the following formats:

a) webmaster@networkautomation.com
b) Network Automation Webmaster <webmaster@networkautomation.com>
c) webmaster@networkautomation.com;sales@networkautomation.com

Subject

Text, Optional - Default (blank)
MARKUP: SUBJECT="This is a test message from AutoMate 5"

Specifies the subject of the message.

Body

Text, Optional - Default (blank)
MARKUP: >"This is a test message from AutoMate 5"</SMTPMAIL>

Specifies the body of the message. If the Is HTML parameter is set to YES, this section should be properly formatted HTML, otherwise this parameter should contain a plain text version of the message.

Is HTML

YES/NO, Optional - Default NO
MARKUP: HTML="YES"

Specifies that the body of the message is formatted HTML and should be displayed by the recipients mail client as such (if supported). Causes the following mail header to be inserted: Content-Type: multipart; boundary="xxxxx".

Use file contents as body

Text, Optional - Default (blank)
MARKUP: BODYFILE="c:\foldername\body.txt"

Specifies that the body of the message should be obtained from the specified text file. When set to YES causes the Body of the message to be ignored.

 

Advanced Tab

From

Text, Optional - Default (blank but usually required by most servers)
MARKUP: <SENDER SERVER="mail.server.com" FROM="me@networkautomation.com" REPLYTO="meinstead@networkautomation.com

Specifies the address information about who the mail should be from.

The FROM parameter can be in any of the following formats:

a) webmaster@networkautomation.com
b) Network Automation Webmaster <webmaster@networkautomation.com>

Reply to

Text, Optional - Default (blank)
MARKUP: <SENDER SERVER="mail.server.com" FROM="me@networkautomation.com" REPLYTO="meinstead@networkautomation.com

Specifies the address information about who the mail should be from.

The FROM parameter can be in any of the following formats:

a) webmaster@networkautomation.com
b) Network Automation Webmaster <webmaster@networkautomation.com>

CC

Text, Optional - Default (blank)
MARKUP: CC="webmaster@networkautomation.com"

Specifies addresses that the message should be sent "carbon-copies" to. Multiple recipients must be separated by semi-colons (;).

The CC parameter can be in any of the following formats:

a) webmaster@networkautomation.com
b) Network Automation Webmaster <webmaster@networkautomation.com>
c) webmaster@networkautomation.com;sales@networkautomation.com

BCC

Text, Optional - Default (blank)
MARKUP: BCC="webmaster@networkautomation.com"

Specifies addresses that the message should be sent "blind-carbon-copies" to. Use of the "blind-carbon-copies" hides the addresses from the target users. Multiple recipients must be separated by semi-colons (;).

The BCC parameter can be in any of the following formats:

a) webmaster@networkautomation.com
b) Network Automation Webmaster <webmaster@networkautomation.com>
c) webmaster@networkautomation.com;sales@networkautomation.com

Priority

Text, Optional - Default - Normal
MARKUP: PRIORITY="high"

Specifies the priority type that the message being sent should be marked as. The available options are:

Request Delivery Report

YES/NO, Optional - Default NO
MARKUP: REQUESTDELIVERYREPORT="YES"

Specifies that a delivery receipt will be received upon delivery of the e-mail message to the recipient's mailbox. This option is disabled by default.

Note: A delivery receipt may not be received if the recipient's e-mail program does not support delivery receipts.

Request Read Receipt

YES/NO, Optional - Default NO
MARKUP: READRECEIPT="YES"

Specifies that a read receipt will be received when the e-mail message has been opened. This option is disabled by default.

NOTE: In Microsoft Office Outlook, the message recipient has the option to decline to send read receipts. There are other scenarios where read receipts are not sent, including if the recipient's e-mail program does not support read receipts.

Certificate

Text, Required
MARKUP: CERTIFICATE="c:\certificate\certname.pfx"

Specifies the full path and filename of the certificate (.cer or .pfx extension) used to authenticate with. This parameter is available only if the protocol selected in the Server tab under the Security parameter is Explicit TLS/SSL or Implicit TLS/SSL.

Password

Text, Optional
MARKUP: CERTIFICATEPASSPHRASE="encrypted"

Specifies the password or passphrase which corresponds to the certificate entered (certificates with .pfx extensions may include a password/passphrase). This parameter is available only if the protocol selected in the Server tab under the Security parameter is Explicit TLS/SSL or Implicit TLS/SSL.

Ignore invalid server certificate

yes/no, Optional - Default No
MARKUP: IGNOREINVALIDCERTIFICATE="YES"

If a server SSL certificate is issued by unknown or invalid certificate authority, AutoMate may generate an error. If this parameter is enabled, AutoMate will automatically ignore any invalid server certificate it detects. This parameter is available only if the protocol selected in the Server tab under the Security parameter is Explicit TLS/SSL or Implicit TLS/SSL.

 

Attachments Tab

Attach

Text, Optional - Default (blank)
MARKUP: ATTACH="c:\foldername\file1toattach.zip;c:\foldername\optionalfile2toattach.zip;"

Specifies file(s) to attach to the e-mail message. Files will be MIME encoded automatically. In Markup mode, multiple file attachments must be separated by semi-colons (;), in visual mode simply add the files to the list by clicking the Folder icon to select the appropriate file to attach then click Add to add the attachment selected. Added attachments will be shown under Current Attachments. To edit or remove an attachment from the Current Attachments list, select the attachment and click Edit or Remove.

 

Server Tab

NOTE: the Server tab contains two options to initially select from:

NOTE: Settings are available in this tab only if the parameter labeled Custom server settings is selected.

Protocol Type

Text, Required
MARKUP: PROTOCOLTYPE="IMAP"

Specifies the protocol type to use. The available options are:

NOTE: Certain parameters may or may not be available depending on the protocol type selected.

Server

Text, Optional - Default (blank, uses default server for the AutoMate installation)
MARKUP: SERVER="mail.server.com"

Specifies the SMTP server that should be used to send the message. This parameter is available only when the Protocol Type selected is SMTP.

Mailbox URI

Text, Required - Default (blank, uses default server for the AutoMate installation)
MARKUP: MAILBOXURL="mail.server.com"

Specifies the Exchange Server Mailbox URL. This parameter is available only when the Protocol Type selected is WEBDAV(EXCHANGE SERVER)

Port

Number, Optional - Default (blank, uses default server for the AutoMate installation)
MARKUP: PORT="3333"

Specifies 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 when the Protocol Type selected is SMTP.

Domain Name

Text, Required - Default (blank, uses default server for the AutoMate installation)
MARKUP: MAILBOXURL="domain.com"

Specifies the Exchange Server domain name. This parameter is available only when the Protocol Type selected is WEBDAV(EXCHANGE SERVER)

Security

Text, Required - Default, "NO SECURITY"
MARKUP: SECURITY="EXPLICIT"

The 'Send E-mail' action supports Explicit and Implicit Transport Layer Security (TLS) and Secure Sockets Layer (SSL) security, which are cryptographic protocols that provide security and data integrity for communications over SMTP, IMAP and POP3 protocols. This parameter is available only when the Protocol Type selected is SMTP. The available options are:

Disable chunking and pipelining

Yes, No - Default, "NO"
MARKUP: DISABLECHUNKING="YES"

Chunking refers to a 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.

Some anti-virus programs may cause e-mail transmission issues when chunking and pipelining is enabled this option is disabled. In such cases, adding a check to the corresponding check-box will disable this option (this option is enabled or un-checked by default). This parameter is available only when the Protocol Type selected is SMTP.   

Use Authentication

Yes, No - Default, "NO"
MARKUP: AUTHENTICATION="YES"

Specifies that a username/password is used to authenticate with the server.   

NTLM

Yes, No - Default, "NO"
MARKUP: USENTLM="YES"

If enabled, specifies that NTLM authentication is administered. NTLM (NT Lan Manager) is an authentication protocol used by many Microsoft servers which uses encryption to securely transmit passwords (this option is disabled by default). This parameter is available only when the Protocol Type selected is SMTP.

Username

Text, Optional - Default (blank, uses default server for the AutoMate installation)
MARKUP: USERNAME="text"

Specifies the username to use to logon to the SMTP mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is selected.

 

Password

Text, Optional - Default (blank, uses default server for the AutoMate installation)
MARKUP: PASSWORD="encryptedtext"

Specifies the password to use to logon to the SMTP mail server and authenticate the mail transaction. This parameter is available only if the Use Authentication parameter is selected.

 

Proxy Tab

Proxy Type

Text [options], Optional - Default (none)
MARKUP: PROXYTYPE="Socks5"

Specifies 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:

Note:  To create the most portable tasks it is best to specify "system default" and specify proxy settings in the Preferences of the Task Administrator (Proxy Tab).  By proceeding this way, tasks created in one environment that may have a proxy server will be portable to others that do not - and vice-versa.

Proxy Port

Number, Optional - Default 1028
MARKUP: PROXYPORT="3000"

Specifies 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 Host

Text, Optional - Default (blank)
MARKUP: PROXYSERVER="proxy.host.com"

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

User Name (Proxy)

Text, Optional - Default (none)
MARKUP: PROXYUSERNAME="username"

Specifies the username that should be used to authenticate when connecting through the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Password (Proxy)

Text, Optional - Default (none)
MARKUP: PROXYPASSWORD="encrypted"

Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

 

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

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

<AMSMTPMAIL SUBJECT="This is a test of the email action of AutoMate 5" TO="webmaster@networkautomation.com" SERVER="mail.server.com" FROM="me@networkautomation.com">Hello this is the body of my message

</AMSMTPMAIL>