WindMail 3.05

©1996-1998 Geocel International, Inc.

Released 04/16/98

WindMail 3.05 *

LIMITED WARRANTY AND DISCLAIMER OF WARRANTY *

Introduction *

What is WindMail? *

What’s New with WindMail *

Getting Started *

Installing WindMail *

Testing WindMail Configuration: Interactive Mode *

Using The Command-Line Interface *

The ‘Quick And Dirty’ Method *

Message Header Parsing *

Features *

Error & Diagnostic Logging *

File Format *

Message Queuing *

.ERR and .Q files *

How do I know if a message has been queued? *

How do I fix a message that was queued due to an error? *

Structure of the .Q and .ERR files *

Command-Line Reference *

WindMail Quick Reference *

Switches *

-a Send file attachment(s) *

-b Set subject line *

-c Set character set *

-e Set Content Transfer Encoding *

-g Set logging level *

-i Start WindMail interactive mode *

-l Use distribution list to specify recipients *

-m Set MIME content-type *

-n Set input file *

-o Set output file *

-p Set TCP port # for mail server *

-q Set queue directory *

-r Set message priority *

-s Set SMTP mail server *

-t Enable header parsing *

-u Set sender’s e-mail address *

-v Display version information *

-y Force or suppress sending of queued messages *

-z Queue all messages instead of sending *

Technical Support *

Appendix A: WINDMAIL.INI File *

Location *

Sample WINDMAIL.INI file *

Parameters *

SERVER *

ADDRESS *

PORT *

LOG_FILE *

LOG_LEVEL *

PERCONNECTION *

CONNECT_TIMEOUT *

MESSAGE_TIMEOUT *

SPOOL_DIR *

TEMP *

CONTENT_TYPE *

CHARACTER_SET *

TRANSFER_ENCODING *

DEBUG_MODE *

DEBUG_HTML *

Appendix B: Process Return Codes *

 

LIMITED WARRANTY AND DISCLAIMER OF WARRANTY

GEOCEL INTERNATIONAL, INC.

WINDMAIL SOFTWARE

SOFTWARE LICENSE AGREEMENT

IMPORTANT: PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE ACCOMPANYING SOFTWARE (the "Software"). BY USING THIS SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THIS PACKAGE AND THE REST OF THE PRODUCT TO YOUR SUPPLIER FOR A REFUND ACCORDING TO THE TERMS OF THEIR REFUND POLICIES.

 

PART I: EVALUATION LICENSE:

1. Evaluation License: GeoCel International, Inc. ("GeoCel") provides evaluation, or trial demo, versions of its software. GeoCel grants you a non-exclusive license to use the Evaluation Version of our Software free of charge for the purpose of evaluating whether you wish to purchase an ongoing license for the Software.

2. DISCLAIMER OF WARRANTY.

THE SOFTWARE PROVIDED FOR EVALUATION AND THE DOCUMENTATION/ACCOMPANYING WRITTEN MATERIALS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE ABOVE IS THE ONLY WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, THAT IS MADE BY GEOCEL, OR THE GEOCEL PRODUCT. FURTHER, GEOCEL DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF USE, OF THE SOFTWARE OR WRITTEN MATERIALS IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE. THE ENTIRE RISK AS TO THE QUALITY, RESULTS AND PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION IS ASSUMED BY YOU. IF THE SOFTWARE OR WRITTEN MATERIALS ARE DEFECTIVE, YOU, AND NOT GEOCEL OR ITS DEALERS, DISTRIBUTORS, AGENTS, OR EMPLOYEES, ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

3. WARNING. The Software provided for evaluation purposes are fully functional but will become non-functional in that they are limited either by time or quantity of transactions allowed following initial installation onto your computer. The specific limitations are noted upon installation. GeoCel disclaims all liability and responsibility for any loss of data or other information which may occur as a result thereof.

 

PART II: TERMS APPLICABLE TO ALL LICENSES PAID:

1. License. GeoCel, International, Inc. ("GeoCel") grants you a non-exclusive right and license to use the accompanying computer software (the "Software") and the related documentation (the "Documentation") as set forth in this Agreement. You may install and use the Software on a single computer for desktop use or on a single computer server. Additional licenses must be purchased for installation on additional computers.

You may make a single copy of the Software for backup and archival purposes only, provided that any copy must contain all proprietary notices included in the original. You may use the Documentation to assist in your use of the Software. If you download the Software without physical delivery of Documentation, you may review the Documentation online, but you may not make further copies of the Documentation. You own the media on which the Software is recorded, but not the Software itself or any copy of it. This license is not a sale of the original or any copy of the Software.

2. Copying, Transferring or Modifying Software. The Software contains copyrighted material, trade secrets and other proprietary intellectual property. You may not permit concurrent use of the Software. You may not permit other individuals to use the Software except under the terms listed above. You may not decompile, disassemble, reverse-engineer or otherwise display the Software in human-readable form. You may not modify, translate, rent, lease, distribute or lend the Software, and you may not sell to others the right to use the Software on your computer. You may not remove any proprietary notices or labels on the Software. You may not copy, transfer, transmit, sublicense or assign this license or the Software except as expressly permitted in this Agreement.

3. Term. This Agreement and license are effective from the time you accept the terms of this Agreement until this Agreement is terminated. You may terminate this Agreement at any time by destroying all copies of the Software. This Agreement will terminate immediately and without further notice if you fail to comply with any provision of this Agreement. All obligations of confidentiality and restrictions on use will survive termination of this Agreement. Upon termination, you agree to destroy all copies of the Software.

4. Limited Warranty. GeoCel warrants that the media on which the Software is furnished will be free from defects in materials and workmanship under normal use for thirty (30) days from the date you received the Software, as shown by your receipt. This warranty is limited to you and is not transferable. This warranty does not cover damage caused by improper use or neglect. GeoCel’s entire liability and your exclusive remedy shall be, at GeoCel's option (i) to replace the defective media; (ii) to advise you how to achieve substantially the same functionality with the Software as described in the Documentation through a procedure different from that set forth in the Documentation; or (iii) to refund the license fee you paid for the Software.

 

THE SOFTWARE PROVIDED FOR EVALUATION AND THE DOCUMENTATION /ACCOMPANYING WRITTEN MATERIALS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE ABOVE IS THE ONLY WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, THAT IS MADE BY GEOCEL, OR THE GEOCEL PRODUCT. FURTHER, GEOCEL DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF USE, OF THE SOFTWARE OR WRITTEN MATERIALS IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE. THE ENTIRE RISK AS TO THE QUALITY, RESULTS AND PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION IS ASSUMED BY YOU. IF THE SOFTWARE OR WRITTEN MATERIALS ARE DEFECTIVE, YOU, AND NOT GEOCEL OR ITS DEALERS, DISTRIBUTORS, AGENTS, OR EMPLOYEES, ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

GeoCel does not warrant that the functions contained in the Software will meet your requirements or operate in the combination that you may select for use, that the operation of the Software will be uninterrupted or error free, or that defects in the Software will be corrected. No oral or written statement by GeoCel or by a representative of GeoCel shall create a warranty or increase the scope of this warranty.

GEOCEL DOES NOT WARRANT THE SOFTWARE AGAINST INFRINGEMENT OR THE LIKE WITH RESPECT TO ANY COPYRIGHT, PATENT, TRADE SECRET, TRADEMARK OR OTHER PROPRIETARY RIGHT OF ANY THIRD PARTY AND DOES NOT WARRANT THAT THE SOFTWARE DOES NOT INCLUDE ANY VIRUS, SOFTWARE ROUTINE OR OTHER SOFTWARE DESIGNATED TO PERMIT UNAUTHORIZED ACCESS; TO DISABLE, ERASE OR OTHERWISE HARM SOFTWARE, HARDWARE, OR DATA; OR TO PERFORM ANY OTHER SUCH ACTIONS.

Any warranties that by law survive the foregoing disclaimers shall terminate ninety (90) days from the date you received the Software, as shown by your receipt.

5. Limitation of Liability. YOUR SOLE REMEDIES AND GEOCEL'S ENTIRE LIABILITY ARE SET FORTH ABOVE. IN NO EVENT WILL GEOCEL OR ITS DISTRIBUTORS OR DEALERS BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OF THE SOFTWARE, THE INABILITY TO USE THE SOFTWARE, OR ANY DEFECT IN THE SOFTWARE, INCLUDING ANY LOST PROFITS, EVEN IF THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

You agree that GeoCel and its distributors and dealers will not be liable for defense or indemnity with respect to any claim against you by any third party arising from your possession or use of the Software or the Documentation.

In no event will GeoCel's total liability to you for all damages, losses, and causes of action (whether in contract, tort, including negligence, or otherwise) exceed the amount you paid for this product.

SOME STATES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS, AND SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE TO STATE.

6. Export Control Laws. You agree to comply with all laws, rules and regulations applicable to the export of the Software or the Documentation. Specifically, you shall not export, re-export or transship the Software or the Documentation, or the direct product thereof, in violation of any United States laws and regulations which may from time to time be applicable. None of the Software or underlying information or technology may be downloaded or otherwise exported or reexported (i) into (or to a national or resident of) Cuba, Iran, Iraq, Libya, Serbia, Montenegro, North Korea, Syria or any other country to which the U.S. has embargoed goods; or (ii) to anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S. Commerce Department's Table of Denial Order. By downloading or using the Software, you are agreeing to the foregoing and you are representing and warranting that you are not located in, under the control of, or a national or resident of any such country or on any such list.

7. High Risk Activities. The Software is not fault-tolerant and is not designed, manufactured or intended for use or resale as control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the Software could lead directly to death, personal injury, or serve physical or environmental damage. GeoCel and its suppliers specifically disclaim any express or implied warranty of fitness for any high risk uses listed above.

8. Governing Law and Interpretation. This Agreement shall be interpreted under and governed by the laws of the State of Texas, without regard to its rules governing the conflict of laws. If any provision of this Agreement is judicially determined to be invalid or unenforceable, in whole or in part, the remaining provisions shall nevertheless be binding and enforceable, and shall be enforced to the maximum permissible extent.

9. Entire Agreement. This Agreement is the complete agreement between GeoCel and you and supersedes all prior agreements, oral or written, with respect to the subject matter hereof.

If you have any questions concerning this Agreement, you may write to:

GeoCel International, Inc., 620 Congress Ste 320, Austin TX 78701.

 

Introduction

What is WindMail?

WindMail is a 32-bit Windows console program that gives you command-line e-mail messaging capability. While there is little advantage to using a command-line utility to send a single message to a friend, it is invaluable for use in batch files, CGI scripts, and for other automated tasks. Since it is a command-line utility, it is immediately accessible through absolutely any programming or scripting language that allows calls to external programs, including simple batch files, enhanced Windows batch languages, C/C++ programs, and Perl scripts.

The method for sending is similar to that of UNIX’s Sendmail, so that most scripts that call Sendmail can be easily modified to call WindMail. This is especially useful for UNIX users migrating to Windows NT who have already invested time developing and testing scripts for Sendmail. Even users who are not in this category benefit from the similarity to Sendmail because a large number of existing scripts written for Sendmail can be modified easily for rapid solutions.

WindMail has a wide array of features that allow it to perform simple, as well as advanced, tasks such as:

 

 

 

 

What’s New with WindMail

[.75a]

[.90b]

[1.00 Release]

[1.01 Update]

[1.50 Update]

[2.00 Release]

[3.00 Release]

 

[3.01 Update]

[3.05 Update]

 

Getting Started

Installing WindMail

Installing WindMail is a very simple process. Simple run the SETUP.EXE, and follow the prompts that appear on your screen. You will be asked for the following information:

Following the installation, you will have the option of running the configuration utility WMCONFIG, which allows you to set various configuration settings such as a message queue directory, log file and logging level, and temporary directory. There is a help file associated with the configuration utility that can assist you with each of the particular settings. If you need to change any of these settings at any time, you can run the configuration utility again.

 

Testing WindMail Configuration: Interactive Mode

After installing WindMail, you should test the configuration to ensure that all settings are correct. You can do this most easily by running WindMail in interactive mode. In interactive mode, WindMail prompts you for the sender, recipient(s), and subject, and then for the message body itself.

You invoke WindMail interactive mode by calling WindMail with the –i switch.

windmail –i

Below is an example of WindMail interactive mode. Input from the user is displayed in bold, and output is in non-bold. You should try sending an e-mail message to yourself or to another e-mail account that you can readily check, so that you can determine quickly if your WindMail configuration is correct.

WindMail Interactive Mode (Send Email from Command Prompt)

From (default 'test@geocel.com'):

To: support@geocel.com

CC:

Subject: This is a test message

-----------------------------------------------------------------------------

Type Your Message Below (End Message with a '.' character on its own line).

-----------------------------------------------------------------------------

This is a test message entered in interactive mode. If there are no errors, then WindMail has been installed and configured correctly.

.

[10/22/97|15:27:28|00198] Connecting to Mail Server (mailhost)...

[10/22/97|15:27:28|00198] Connected!

[10/22/97|15:27:28|00198] Sending: HELO titanium

[10/22/97|15:27:28|00198] From: <timg@geocel.com>...

[10/22/97|15:27:28|00198] Success!

[10/22/97|15:27:28|00198] To: <benc@geocel.com>...

[10/22/97|15:27:29|00198] Success!

[10/22/97|15:27:29|00198] Sending Message Body...

[10/22/97|15:27:29|00198] Message Body Sent.

Note that you should end the message with a ‘.’ on the last line. After entering the message, WindMail displays connection information so that you can readily see any errors it may encounter. If WindMail is unable to connect to the mail server, or another error is encountered while attempting to send the message, you will see a descriptive error message displayed.

Using The Command-Line Interface

In most cases, WindMail will be invoked from a batch file, script, or other program, and not by a human user directly from the command-line. Most of WindMail’s features, including file attachments and distribution lists are accessible through WindMail’s command-line interface. There are various ways to invoke WindMail, depending on the manner in which you wish to pass parameters.

 

The ‘Quick And Dirty’ Method

The most basic way to call WindMail is to specify the sender, recipient(s), subject, and a file containing the message body as command-line parameters. For example:

windmail –b "This is the subject line" –f "Joe Sender" –u joesender@domain.com –n message.txt recipient@domain.net

Switch Description
b Subject
f Sender’s name
u Sender’s email address
n Filename of text file containing message body

All parameters that do are not preceded by a ‘switch’ (a hyphen ‘-‘ followed by a letter) are assumed to be recipient email addresses.

This is the ‘quick and dirty’ method for sending a message and offers functionality that is suitable for many applications. However, in this mode, features like blind carbon copying require that WindMail operate in header-parsing mode.

 

Message Header Parsing

The easiest way to send a message is to operate WindMail in header-parsing mode. In this mode, WindMail reads the message header from the input file and uses the values it finds for relevant message fields such as sender, recipient(s), and subject line. You must use this method to use the ‘CC:’ and ‘BCC:’ fields, as you cannot specify these fields on the command-line.

The general syntax for enabling message header parsing is:

windmail –t [other switches]

The message header should be the first part of the input file and terminate with a blank line. The general structure for the message header is:

From: "Webmaster" <webmaster@domain.com>

To: "Joe User" <joeuser@domain.com>

CC: "Bill" <bill@somedomain.com>, "Luke Zardock" <lzdk@zardock.com>

BCC: "OtherGuy" <otherguy@someotherplace.com>

Subject: User Manual

Attach: "C:\My Documents\User Manual.doc"

Note: There should be a blank line following the last line of the message header and preceding the message body.

The ordering of the elements in the message header is unimportant and only the ‘To:’ field is generally required.

Take the following command-line as an example:

windmail –t –n message.txt

where message.txt contains the following:

To: "Valued Customer" <recipient@domain.com>

From: "My Company" <sender@mydomain.com>

CC: <otherguy@someotherplace.com>,<user3@elsewhere.net>

BCC: "User A" <user@unknown.net> ,"Bob" <bob@generic.com>

Subject: Subject line

Message text goes here

.

Note the blank line between the last line of the message header and the first line of the message body. Also note that the last line should contain a period followed by a CR/LF.

 

Features

Error & Diagnostic Logging

WindMail 3.0 offers four levels of error and diagnostic logging: basic, success, extended, and verbose. Each level provides all the logging functionality of the levels below it and then adds more functionality. You can also disable logging altogether, although this is generally discouraged. Maintaining a log file is recommended because the log file is invaluable in diagnosing any possible errors.

The log file and level of logging can be set using the configuration utility WMCONFIG. You can override either of these settings on the command-line when running WindMail, however, so these settings are only defaults.

The recommended logging level for a working WindMail configuration is Basic. Basic logging is actually quite verbose if there is an error, but is ‘quiet’ otherwise. If you want a record of every message successfully sent, the success logging level provides this one extra feature. Extended logging records information about connection to the mail server, while verbose logging records message data sent to the mail server and responses from the mail server.

There are currently five valid logging levels, including no logging:

Level # Name Additional logging functionality
0 None No logging at all
1 Basic All errors logged
5 Success Records when a message has been successfully sent
10 Extended Logs info about connection to mail server
15 Verbose Logs all data sent to mail server, strings returned from mail server

Note that each level logs all messages that it would log for the levels below it.

 

 

File Format

The log file consists of one-line log records, each date- and time-stamped. Further, each line is identified by the process ID and message number. The process ID is simply an arbitrary number assigned by Windows 95/NT that identifies a particular process. It is logged because it is possible, and quite likely, that there will be more than one WindMail process running simultaneously, each writing to the same log file.

The message number is a number assigned by WindMail on a per process basis that uniquely identifies a message. This is necessary because WindMail can potentially send multiple messages in a given run if there are messages in the queue. Below is a portion of a verbose-level log file written by WindMail.

[11/03/97|09:13:14|00215.1] Sending attachment ‘y:\projectswm_102297.zip'...

[11/03/97|09:13:19|00215.1] Attachment Sent.

[11/03/97|09:13:19|00215.1] MS - 250 JAA24303 Message accepted for delivery

[11/03/97|09:13:19|00215.1] MS - 221 lithium.geocel.com closing connection

[11/03/97|09:28:30|00220.0] WM - TEMP FILE '.\GF8.tmp'

[11/03/97|09:28:30|00220.0] WM - TEMP FILE '.\GF9.tmp'

[11/03/97|09:28:31|00220.1] WMAPI - TEMP FILE '.\GFA.tmp'

[11/03/97|09:28:31|00220.1] Connecting to Mail Server (mailhost)...

[11/03/97|09:28:31|00220.1] Connected!

Lines beginning with "MS - " are strings returned from the mail server. Lines beginning with "WM – ", "WMAPI – ", or simply the message itself are from WindMail.

Message Queuing

Messages that WindMail is unable to send are preserved in the queue directory if your configuration has a valid queue directory. When you installed WindMail, the installation program prompted you for a default directory for queued messages. If you did not specify one, queuing is disabled unless you specify a directory with the -q switch or add a default queue directory using the configuration utility WMCONFIG.

In general, a message is queued if WindMail cannot connect to the mail server, if the mail server refuses to accept the message for any reason, or if the message contains a fatal error such as the lack of a valid recipient. Queuing preserves the messages so that you can attempt to re-send the messages at a later time after errors, if any, have been fixed.

If the message does not contain any errors, but the mail server refuses the message or WindMail is not able to connect to the mail server, the message is saved in the queue directory with extension .Q. The next time you use run WindMail to send another message, WindMail attempts to re-send any such queued messages. You may also invoke WindMail specifically to re-send any queued messages. (See, "Flushing the Queue", below).

If there is an error in the message itself, then WindMail saves the message in the queue directory with extension .ERR. WindMail does not attempt to re-send messages with an .ERR extension. However, since WindMail saves these messages, you can fix the errors and change the extension of the files from .ERR to .Q. Then, the next time WindMail is run, it will attempt to re-send the messages.

.ERR and .Q files

A single queued message is actually saved in as many as four different files, each containing a different element of the message. The message header, message body, distribution list, and file attachment list are saved in separate files, named in a specific manner so that WindMail will automatically detect them in the queue directory.

In general, you should not rename or delete any of the files as doing will likely cause WindMail to be unable to identify the file as part of a queued message and render it unable to re-send the message in its original state. The exception to this rule is that you will need to rename all the file extensions from .ERR to .Q. for those messages for which you have fixed errors.

Queued message files will be named in the form GYxxxxxx.ERR for messages with errors and GYxxxxxx.Q for messages without errors, where xxxxxx is a unique six-digit number identifying a single message and Y is a single letter identifying the part of the message. Y will be either B, H, D, or A, signifying body, header, distribution list, or attachment list, respectively.

Filename Description Contains
GHxxxxxx Message header ‘To:’, ‘From:’, ‘Subject:’, ‘CC:’, ‘BCC:’, other fields
GBxxxxxx Message body Actual text of the message body
GDxxxxxx Distribution list A list of each of the recipients of the message, if a distribution list was used to specify recipients
GAxxxxxx Attachment list A list of file attachments, if any were attached to original message

WindMail will automatically use the next available number in the queue directory in naming the files.

 

How do I know if a message has been queued?

If your configuration has a log file and your logging level is at least basic, then WindMail logs each time a message has been queued. If there is an error in the message that caused WindMail to queue the message, then you can also determine from the log file what the error is.

The log entry will look similar to this:

[11/03/97|09:13:11|00107.3] No valid recipients.

[11/03/97|09:13:11|00107.3] Message File(s) Written to 'C:\Queue\G*000003.ERR'

In this case, the message was queued because of there were no valid recipients specified. Refer to "Error & Diagnostic Logging" for information on how to read the log file.

 

How do I fix a message that was queued due to an error?

You must determine what the cause of the error by looking at the log file. Depending on the error, you can probably fix it by opening up one or more of the .ERR message files with a text editor such as Notepad, and adding, deleting, or editing a line.

A typical error is leaving out the ‘To:’ field, as in the above example. To fix this, simply open up the header file, in this case GH000003.ERR. After fixing the error, you must rename all queue files for that message from .ERR files to .Q files. You can do this from the command-line easily. For example, assuming you are in the queue directory where the queue files exist:

rename G?000003.ERR *.Q

will rename all files associated with message 3 so that their extension is changed to .Q. It is necessary to change the extension because WindMail will attempt to re-send only those messages in the queue directory that have .Q extensions; any messages with .ERR extensions are ignored by WindMail.

 

Structure of the .Q and .ERR files

The .Q and .ERR files are simple text files that can edited with any standard text editor such as Notepad.

Message header file GHxxxxxx

The message header file contains a message header generated by WindMail that contains information about the sender, recipient(s), subject, and other fields. This information may have originally come from the message header in the original input file, from parameters specified on the command-line, or from defaults specified in the configuration file or supplied by WindMail. In most cases, the message header is generated from a combination of all these.

In general, unless there was an error in the message header itself, each generated header file will have at least the following four fields:

To: recipient@somedomain.com

From: support@geocel.com

Content-Type: text/plain; charset="us-ascii"

Content-Transfer-Encoding: 7bit

Note: If you are using a distribution list, the ‘To:’ field may be blank or missing altogether.

If no sender (the value of the ‘From:’ field) is specified, then the default sender is read from the configuration file. These and other defaults can be modified using the configuration utility WMCONFIG. Similarly, if no particular content-type, character set, or content-transfer-encoding scheme is specified, the default value from the configuration is assumed.

These default values appear explicitly in the generated header file because this preserves the integrity of the message if the defaults change before the message is re-sent from the queue.

There well likely be other optional fields, such as ‘Subject:’, and ‘CC:’ also present in the generated header file, as well as header fields that are ignored by WindMail but were present in the original input file’s message header.

If a distribution list was used, the ‘To:’ may contain any string desired, including a valid e-mail address, as it will be merely decorative and not considered by WindMail as containing recipient information.

If attachments were specified in the header with ‘Attach:’ lines, these will no longer exist in the generated header file. Instead, any attachments, whether specified using an ‘Attach:’ field in the original header or on the command line with the –a switch, are listed in the separate attachments list file.

You should generally not add ‘Attach:’ fields to the generated header file; list the files in the attachment list file instead. If you are simply adding one attachment, you can do so if it is convenient to do so, and in this case, do not add the file to the attachment list file. However, if the message is re-queued, the attachment will be stripped from the header and listed in the attachment list file.

Message body file GBxxxxxx

This is simply a text file of the message body itself, i.e., the message text without the header. Note that while in the original input file, the last line of the message terminated with a "." on a separate line, the body file for queued messages has no such line, as it is not needed.

Distribution list file GDxxxxxx

This file only exists if a distribution file was used for the original message, and is merely a copy of the original file, assuming the original file is a text file (not a binary file) as it should be.

Attachment list file GAxxxxxx

This text file only exists if attachments were specified in the original header with ‘Attach:’ fields or on the command-line with the –a switch. This file simply lists the full path to any such attachments, one attachment per line.

Command-Line Reference

WindMail Quick Reference

General Usage:

WindMail reads the message header and body from either standard input, or from specified with –n.

windmail [switches] [recipients…]

Switches

Switch Description
-a filename Specify file to attach (to attach multiple files, use switch multiple times)
-b text Set subject line
-c charset Specify a character set to use
-e encoding Specify content-transfer-encoding
-g logging level Specify error/status logging level (0, 1, 5, 10, 15)
-i Operate WindMail in interactive mode
-l filename Specify a distribution list containing recipients
-m type Set MIME content-type of message body
-n filename Specify a file to use as input
-o filename Specify a file to use as output (use CON for screen output)
-p port # Specify TCP port to use for SMTP server
-q path Set queue directory
-r priority Set message priority (1 = highest, 5 = lowest)
-s server Set name or IP address of the SMTP server
-t Enable message header parsing
-u email Specify sender’s email address
-v Display version information
-y hold Suppress sending of queued messages
-y flush Force sending of queued messages
-z Queue-only mode (no messages sent to server)

Input File Format:

<Message header>
 
<Message body>
.

Note the blank line between the header and message body, and that the last line of the input file should be a ‘.’ followed by a CR/LF.

Message Header Format:

X-Priority: <priority level>
To: ["username"] <email address>, ["username"] <email address>…
From: ["username"] <email address>
CC: ["username"] <email address>, ["username"] <email address>…
BCC: ["username"] <email address>, ["username"] <email address>…
Subject: subject line
Attach: filename
Content-Type: <type>/<subtype>; charset="<character set>"
Content-Transfer-Encoding:
<other fields>

If you include the optional username, be sure to enclose the email address in the ‘<’ and ‘>’ symbols, i.e.:

To: "Joe User" <joe@domain.com>

The order of the fields is not important, and WindMail will not perform any handling on fields not listed here. Note that you may have multiple ‘To:’, ‘CC:’, ‘BCC:’, and ‘Attached:’ lines. Only the ‘To:’ and ‘From:’ fields are required in most cases, and other fields are optional.

 

Switches

-a Send file attachment(s)

Description:

Attaches one or more files to an e-mail message.

Usage:

windmail -a <filename> [-a <filename>].. -t

windmail -a <filename> [-a <filename>].. <recipient> [<recipient2>]..

windmail -a <filename> [-a <filename>]..-l <distribution list file>

Example:

windmail –a c:\config.sys –a "D:\My Documents\Jim.doc" –t –n message.txt

Notes:

You can specify multiple attachments to the message simply by using the switch multiple times, once for each file attachment.

File attachments can be text or binary files of any type. This means you can send executables, archives, or word processor documents as file attachments just as you would with popular email client programs such as Eudora, Netscape, and Microsoft Exchange.

There is no arbitrary size limit set by WindMail for file attachments. Some Internet Service Providers (ISPs), however, set size limits on files that can be sent to and from their network. America Online and The Microsoft Network, for example, do not allow attachments to exceed one megabyte.

You may also attach a file by specifying the file on the field ‘Attached:’ in the message header, if you’re using the –t switch.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
X x x X x x x x x x x x x x x x   x x

 

-b Set subject line

Description:

Specifies a subject line for the message.

Usage:

windmail –b <subject> <recipient> [<recipient2>]..

 

Example:

windmail –b "Request received" –n message.txt user@domain.com

 

Notes:

You cannot use this switch with –t or -l. You must specify the recipient(s) on the command-line.

The input file should not contain a message header.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x X x X x     x x x x x x x   x   x x

 

-c Set character set

Description:

Specifies a character set to use. If this switch is not used, the default specified in the WindMail configuration file is used. If there is not a default in the Appendix A: WINDMAIL.INI File file, "us-ascii" is used. You only need to use this switch if you are using a character set other than the default.

Usage:

windmail –c <character set> -t

windmail –c <character set> <recipient> [<recipient2>]..

windmail –c <character set> -l <distribution list file>

 

Example:

windmail –c "iso-8859" –n message.txt -t

 

Notes:

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x X X x ? x x x x x x x x x x   x x

 

-e Set Content Transfer Encoding

Description:

Specifies the content transfer encoding to use for the message body. The content transfer encoding identifies both the transformation algorithm used, if any, on the message body, as well as the domain of the result.

You need only specify the content transfer encoding if you wish to use a value other than the default specified by the configuration. If no default is specified in the configuration file, then the default is "7bit".

Usage:

windmail –e <encoding type> -t

windmail –e <encoding type> <recipient> [<recipient2>]..

windmail –e <encoding type> -l <distribution list file>

Example:

windmail –e "base64" –n message.txt -t

 

Notes:

Unless you are encoding the data yourself using an encoding mechanism such as base64 or quoted-printable, this value should either be ‘7bit’ or ‘8bit’ to specify the bit-width used in the message body. Unless you are using a character set that requires 8-bit characters, you should generally leave this value as ‘7bit’.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x X x ? x x x x x x x x x x   x x

 

 

 

-g Set logging level

Description:

Sets the level of logging performed by WindMail.

Usage:

windmail –g <logging level> -t

windmail –g <logging level> <recipient> [<recipient2>]..

windmail –g <logging level> -l <distribution list file>

There are currently five valid logging levels, including no logging:

Level # Name Additional logging functionality
0 None No logging at all
1 Basic All errors logged
5 Success Records when a message has been successfully sent
10 Extended Logs info about connection to mail server
15 Verbose Logs all data sent to mail server, strings returned from mail server

Note that each level logs all messages that it would log for the levels below it.

Example:

windmail –g 5 –n message.txt -t

This sets the logging level to success.

Notes:

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x X   x x x x x x x x x x   x x

 

-i Start WindMail interactive mode

Description:

Invokes WindMail’s interactive mode, in which WindMail will prompt you for the ‘To:’, ‘From:’, ‘CC:’, ‘BCC:’, and ‘Subject:’ fields, as well as the message body. Interactive mode is a simple way to test your WindMail configuration.

 

Usage:

windmail -i

Notes:

If you use -i with -l, the value of the ‘To:’ field does not have to be a valid e-mail address, as the field will be merely decorative. You cannot leave the ‘To:’ field blank, however.

The logging level automatically used in interactive mode is extended, and the log file is the console (screen). You cannot specify a different log file or logging level.

 

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x   x x   X x x     x x x x       x x

-l Use distribution list to specify recipients

Description:

Targets everyone in a distribution list file as recipients of your message.

Usage:

windmail -l <filename>

Example:

windmail –l "C:\Mailing Lists\Employees.txt" –t –n message.txt

sends the message in message.txt to each recipient in the distribution list C:\Mailing Lists\Employees.txt.

File Format:

A distribution list is a text file with at one or more email addresses, each on its own line. For example, a distribution list file might look like:

webmaster@yourdomain.com

mikey@yourdomain.com

pete@mydomain.com

happy@smiley.com

Notes:

If you wish to specify subject or other header fields, these fields must be in the header in the input file. You cannot use -b or -u with distribution lists.

You cannot specify recipients on the command-line. Any message header elements should be present in the input file. Only e-mail addresses in the distribution list file are recipients; the string in the ‘To:’ field, if any, is merely decorative, and will be displayed in each recipient’s message.

Using a distribution list is an alternative to using the ‘CC:’ and ‘BCC:’ fields to send a message to multiple recipients. The advantage of using a distribution list is that the recipients are not specified in the message itself as part of the message header, but rather in a separate text file.

Also note that if you use ‘CC:’ to send to multiple recipients, each recipient is able to see all other recipients of the message. This is not the case with messages sent using a distribution list; instead, the ‘To:’ field, if any, will have the same value for all recipients.

You can have as many entries as you want in a distribution list. However, the actual ability to process a large number of recipients will depend on your mail server. Most SMTP email servers are capable of at least 100 recipients. In order to send mail to more than 100 people at a time, it is a good idea to break the distribution list into several smaller batches of 100 or fewer recipients. Oddly, this usually decreases the time required to send many emails since the SMTP server has an easier time dealing with smaller batches.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x   x X x x X x x x x x x x x     x x

 

-m Set MIME content-type

Description:

Sets the MIME content-type used in the message body. MIME content types are used to specify the media type of the message.

Usage:

windmail –m <content-type> -t

windmail –m <content-type> <recipient> [<recipient2>]..

windmail –m <content-type> -l <distribution list>

<content-type> can be any valid MIME type whatsoever. It is typically of a subtype of text. The following are common text MIME content-types:

Content-type Description
text/plain Plain text; this is the default and the most commonly used
text/html Text that is marked up in HTML
text/enriched Text that is marked up in a simple ‘enriched’ text format supported by many MIME-aware e-mail client programs that allows your message to include simple formatting such as bold, italics, and type size.

Example:

windmail –m text/enriched –t –n input.txt

input.txt:

To: "Joe User" <joeuser@domain.com>
From: WebMaster <webmaster@mydomain.com>
Subject: This message contains enriched text
 
<bold><bigger><bigger><bigger><bigger>Large text<italic>in italics</italic></bigger></bigger></bigger></bigger></bold>
.

The message body will display in Joe User’s MIME-compliant e-mail reader as something like:

Large text in italics

Notes:

You must be familiar with the format for the particular content-type you choose.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x X x x x X x x x x x x x x   x x

 

-n Set input file

Description:

Specifies a file to be used as the input file. The input file contains the message itself.

Usage:

windmail –n <input file> -t

windmail –n <input file> <recipient> [<recipient2>]..

windmail –n <input file> -l <distribution list>

Example:

windmail –n input.txt -t

input.txt:

From: "GeoCel Product Support" <support@geocel.com>
To: user@domain.com
Subject: WindMail 3.0 Release
 
As a user of WindMail 2.0, you are eligible for special upgrade pricing to the new WindMail 3.0 release. New features include extensive error logging, redesigned and improved message queuing, support for multiple file attachments per message, and support for different MIME content-types and character sets.
.

Notes:

This switch can be used as an alternative to using standard I/O redirection when redirection is either unavailable or undesirable.

If you do not use this switch to specify a file, WindMail will expect input from the standard input device. Unless you redirect standard input, this is the ‘console’, or keyboard.

If you use –t, or –l and want to specify a message header field, you must include a message header in the input file. If you specify the recipient(s) on the command-line, the input file need only contain the message body.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x X x   x x x x x x x x x x   x x

 

-o Set output file

Description:

Specifies the file to which WindMail will append any logging information. The default file is specified in the Appendix A: WINDMAIL.INI File configuration file, which can be changed using the WMConfig utility.

The level of logging performed by WindMail to this file will vary based on the logging level, also specified in the configuration file. See Error & Diagnostic Logging for more information on logging and logging levels.

Usage:

windmail –o <filename> <recipient> [<recipient2>]..

windmail –o <filename> -l <distribution list>

windmail –o <filename> -t

To send output to the standard output device (by default, the screen) use con as the filename.

Example:

windmail –o "C:\WindMail\Error Log.txt" –n input.txt –t

 

Notes:

If the file does not exist, it is created; otherwise, output is appended to the file.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x   x x x X x x x x x x   x x

 

-p Set TCP port # for mail server

Description:

Set the TCP port used to connect to the SMTP mail server. When this switch is not used, WindMail uses the port specified in configuration file Appendix A: WINDMAIL.INI File. If there is not a port setting in the WINDMAIL.INI file, WindMail uses the standard SMTP mail server port, 25.

Usage:

windmail –p <port #> –t

windmail –p <port #> <recipient> [<recipient>]..

windmail –p <port #> -l <distribution list>

Example:

windmail –p 2048 –t –n input.txt

Notes:

In most cases, this switch will rarely be used.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x x x x x x X x x x x x   x x

 

-q Set queue directory

Description:

Specifies the directory WindMail will use as the queue directory. See Message Queuing for more information about this feature.

Usage:

windmail –q <directory> -t

windmail –q <directory> <recipient> [<recipient2>]..

windmail –q <directory> -l <distribution list>

Example:

windmail –q "C:\WindMail\MsgQueue" –t –n input.txt

Notes:

Unless –y hold or -z is specified, WindMail will send any messages queued in the directory specified.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x x x x x x x X x x x x   x x

 

-r Set message priority

Description:

Specify a priority for the message. This is strictly for the benefit of processing by the mail server or the recipient’s e-mail reader, and does not affect the delivery of messages by WindMail.

Usage:

windmail –r <priority level> -t

windmail –r <priority level> <recipient> [<recipient2>]..

windmail –r <priority level> -l <distribution list>

where <priority level> is one the following:

Priority Level Description
1 Highest
2 High
3 Normal
4 Low
5 Lowest

Example:

windmail –r 2 –b "Subject" support@geocel.com

Notes:

If this switch is not used, no priority is set.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x x x x x x x x X x x x   x x

 

-s Set SMTP mail server

Description:

Specifies the SMTP mail server to connect to. This will override the setting specified in the Appendix A: WINDMAIL.INI File file.

Usage:

windmail –s <mail server address> -t

windmail –s <mail server address> <recipient> [<recipient2>]..

windmail –s <mail server address> -l <distribution list>

<mail server address> is the IP address of the mail server or a name that can be resolved by a DNS.

Example:

windmail –s mailhost.domain.net –t –n input.txt

Notes:

Switch Compatibility

-a -b -c -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x x x x x x x X x x   x x

 

-t Enable header parsing

Description:

Enables header parsing. This mode is used as an alternative to specifying the recipient(s) on the command line, so that recipient(s), subject, and other message header elements are specified in the input file.

Usage:

windmail –t

The input file should contain at least one of the following fields in the message header.

Field Description Multiple Example
From: Sender of the message

No

From: "John Doe" <jdoe@domain.com>
To: Primary recipient(s) of the message

Yes

To: "Jane Doe" <jane@domain.net>
Subject: The subject of the message

No

Subject: Thank You For Your Time
CC: Additional recipient(s)

Yes

CC: jim@domain.net, "Nancy" <nancy@domain.com>
BCC: Additional recipient(s) (not listed)

Yes

BCC: "Geoff" <geoff@geocel.com>, jbwright@d.com
Attach: File to attach

Yes

C:\My Documents\Letter.doc

Example:

windmail –t –n input.txt

input.txt:

To: Webmaster <webmaster@domain.com>
From: "GeoCel Product Support" <support@geocel.com>
Subject: Updated WindMail 3.0 FAQ
Attached: wmfaq.txt
 
Attached is the latest FAQ for WindMail 3.0, compiled from technical support questions asked by WindMail users.
.

Notes:

When using –l with –t, it is not necessary to specify recipient(s) in the ‘To:’ field. Otherwise, the input file must have a message header with at least the ‘To:’ field.

If a default ‘From:’ address is not specified in the Appendix A: WINDMAIL.INI File file, you must include a ‘From:’ field in the message header.

Switch Compatibility

-a -b -c -e -g -i -l -m -n -o -p -q -r -s -t -u -v -y -z
x x x x x   x x x x