watchDirectory Help

Help Home
Creating New Tasks
Running Tasks
Task History


Standard versus Pro
Version History


See Also...

Free 30 day evaluation!
Standard version: $79 USD
Professional version: $149 USD
Buy Now!


German Helpfile

German Helpfile

French Helpfile

French Helpfile

Privacy Policy

Sending HTML email

If you want to use rich formatting (bold fonts, colors, etcetera) inside your email messages, you will need to enter a complete HTML document inside the email body. You can use most HTML editors to create the page, and then just copy/paste it into the settings window.

To ensure email clients will recognize the message as an HTML message, the message must contain special headers. WatchDirectory will write those headers only if the message body starts with <html>. When there is even a single space before the <, watchDirectory will not write the necessary headers (exception: see below for attaching extra images).

Combine Email Messages
See the bottom of this page if you want to "Combine HTML Emails".

Using the new file as an image in your email

If you send this email because a new or changed file is detected, you can attach this file to the message. If the new file is an image, you can "insert" it in your html using this code:
<IMG SRC="cid:message-root.1" ALT="%WD_FILE_N%">
The ".1" inside the SRC link above is a reference to the first attachment of your message. Note that if you use the "-attach" command explained below, you will have to replace ".1" with a higher number.

Using images on a webserver

Images on a webserver can be referenced like this:
<IMG SRC="" ALT="GdP Software Logo">
SPAM Alert
There are several disadvantages to use images on your webserver:

  • Some email clients will refuse to download them, as those images could be used to track if SPAM is received.
  • For the same reason, spam filters will be more likely to consider the message SPAM.
  • The receiver must be connected to the internet to see the images

Attaching extra images

You can attach extra images to the message by using the attach command at the start of the message body:
-attach filename
For example:
-attach C:\My Images\Company Logo.jpg
-attach C:\My Images\DonaldDuck.gif
This will attach 2 images to your message. Inside the message body, you can insert these images like this:
Our company logo: <IMG SRC="cid:message-root.1" ALT="Company Logo">
A nice picture of me: <IMG SRC="cid:message-root.2" ALT="Donald">
This is the new file: <IMG SRC="cid:message-root.3" ALT="%WD_FILE_N%">
If you also attach the file that triggered this message, that file will be attached after the files you attach with the -attach command. Make sure to use the correct message-number (cid:message-root.3 in the above example) to reference the new file.
Local files only
The -attach command can be used for local files only, typically on your C: drive.

An example HTML message

<h1>$RS$: %WD_FILE_N%</h1>
<FONT FACE="helvetica">
Hi, there is a new file, called %WD_FILE_N% inside directory %WD_FILE_D% on computer $COMP$!

Display an image that resides on <a href="">our web server <BR>
<IMG SRC="" BORDER="0" WIDTH="76" HEIGHT="64" ALT="GdP Software"></a>

Inline display of the new file. Note that "cid" is in lower case.
<IMG SRC="cid:message-root.1" ALT="%WD_FILE_N%">

<FONT FACE="courier">
This line uses COURIER font. <BR>

<CENTER>This line is centered</CENTER> <BR>
<BLINK>This line is blinking</BLINK> <BR>

<I>This line is italicized</I> <BR>
<B>This line is bold</B> <BR>
<TT>This line is teletype font</TT> <BR>

<FONT COLOR="#ff0000">This line is RED</FONT> <BR>
<FONT COLOR=RED>This line is RED</FONT> <BR>

Unordered List follows
<LI> First list item
<LI> Second list item
<LI> Third list item

Ordered List follows
<LI> First list item
<LI> Second list item
<LI> Third list item

A "horizontal" rule follows this line.

Thank you!


Combine HTML Email Messages

As the above example shows, a typical HTML email message looks like this:

1: <html>
2: <head>
3: <title>Hello World</title>
4: </head>
5: <body>
6: New file detected: %WD_FILE%
7: </body>
8: </html>

(The line numbers are there for this explanation only)
When 2 HTML emails are combined, this is what happens:

The "Intro" and "Append" text of Combined HTML Emails

Just before the combined email is sent, the following happens:

Attached Images in Combined Emails

As noted above, if you want to reference the attached file as an image, you normally enter something like
<IMG SRC="cid:message-root.1" ALT="%WD_FILE_N%">
where cid:message-root.1 references the first attached file. The obvious problem is that if this email is combined, it will have multiple attached files, and you want to reference the "current" attached file. To make sure the correct image is referenced use the following syntax:
<IMG SRC="cid:message-root.$" ALT="%WD_FILE_N%">
So, you enter a dollar-sign as the attachment number instead.

Return to The Email plugin