Monitor FTP sites with WatchFTP Monitor FTP sites with WatchFTP


  screenshot of this window

Send an Email

This is one of the Additional Actions supported by WatchFTP and typically sends an email for each downloaded file.

  1. Complete the fields using the variables below in the message Subject and Body
  2. Click SMTP Server to enter your SMTP Server settings

Subject: The subject for your email. You can use variables (see below) that will be replaced at runtime.

Message Body: The message body of this email. You can use variables (see below) that will be replaced at runtime.

To, CC, BCC...: Enter one or more email addresses that will receive this message. Multiple addresses are separated by commas.

One email per download: Send an email for each downloaded file. If this option is not selected, only a single email is sent for all downloaded files.

Selecting this option also enables the Environment Variables supported by the Start a Batch script action. Note that those variables are surrounded by %percentage% signs, not dollar-signs.

SMTP Server: Enter the settings for your SMTP Server here.

Variables

$DATE$Current date.
$TIME$Current time.
$WFILE$Windows Filename of the downloaded file.
If you did not select One email per download this variable contains the list of the downloaded files and is ignored in the message subject.
$UFILE$The Unix Filename of the downloaded file.
If you did not select One email per download this variable contains the list of the Unix filenames and is ignored in the message subject.

If you selected One email per download, you can also include Environmental Variables surrounded by percentage signs.

Repeat Blocks

If you have not selected "One email per download", WatchFTP sends just one email for all downloaded files. Inside the message body of this email you can write a "repeat block" that will be repeated for each file. Inside those repeat blocks you can also use Environmental Variables that will be replaced by correct values for the "current" file.

For a Repeat-Block example, see HTML Email below.

HTML Email

If you want to send nicely formatted emails, you can let WatchFTP send them in HTML format. To make sure WatchFTP recognizes it should enable html, make sure your message body starts with <html>.

Example:

<html>
<body bgcolor="#E6E6FA">
Hello!<br><br>

#REPEAT#
The FTP file <b>$UFILE$</b> has just been
downloaded to <b>$WFILE$</b> (%WF_FILE_SIZE_KB% kilobytes).<br>
#ENDREPEAT#
</body>
</html>