7 - Sending an outgoing message - Background Information
Click here for main text
Double-clicking the 'Dispatch' program object will send all messages in the Out folder that are ready for sending. If you want to send a single message, drag and drop it onto the 'Dispatch' program object instead, or use the 'Depatch' entry in the message file object's pop-up menu (under 'Open as').

Before dispatch

RexxMail prepares a separate sendable message file for sending (in the 'Temp' subdirectory of the RexxMail Program directory) using the contents of the message edit file and of the attachments directory linked to the message file object.

If the general 'ASCIIText' option has been set in the 'settings.txt' file or if the ASCII text option has been set for this message by means of the 'Set ASCII Text' pop-up menu option, RexxMail converts the message header and body to 7-bit ASCII text. The ASCII text setting of a message file is shown by the legend 'ASCII' in the file object's icon.

During the conversion to ASCII, RexxMail preserves the contents as much as possible by replacing 8-bit characters with 7-bit approximations if available. In addition, long lines are word-wrapped by inserting CRLF pairs. The maximum line length can be set by means of the 'ASCIILineLength' setting in the 'settings.txt' file. If the ASCII option has not been explicitly set, RexxMail defaults to converting any 8-bit header content to ISO-8859-1 equivalents, and converting the body content to ISO-8859-1 'quoted/printable' text (to preserve long lines and paragraphs).

Note that since RexxMail itself uses code page 850 (the standard OS/2 code page), it expects message text files to use the same. Messages composed using code page 850 may contain 8-bit characters that cannot be represented in the ISO-8859-1 character set. These characters are converted to underscores before the message is sent.

Next, RexxMail looks for any attachment files in the attachments folder assigned to the edit file. If it finds any attachments, RexxMail looks for a RunAttOut command line in the 'settings.txt' file. If it finds one, it runs the command in the attachments folder to preprocess the attachment files before adding them to the message. This option can be used to run e.g. a file compression program before sending the message.

Next, RexxMail uses the 'mmencode.exe' program to convert the contents of the attachment folder to base64-encoded 7-bit text, which is then included in the message body of the sendable file in the form of MIME attachment blocks.

The names of the files sent with the message as attachments are listed in the 'Comments' field on the 'File' page of the message object's properties notebook. While a message remains unsent, the location of the associated attachments folder is kept in the 'Subject' field on the same page.

During dispatch

Once the sendable file has been successfully completed, RexxMail runs the command specified by the 'RunDispatch' entry in the 'settings.txt' file. This can be used for example to call an SMTP mailer (e.g. sendmail.exe) to send the message. If it finds no 'RunDispatch' entry, RexxMail uses its internal SMTP routine to send the message.

After dispatch

Using the 'mailsent.txt' file, messages can be automatically deleted or stored in different folders after dispatch, based on their header content. RexxMail provides options for deleting certain messages, storing certain messages in various user-defined folders, and storing any remaining messages in a user-defined default folder. See the 'mailsent.txt' file itself for more information.

If a sent message is subsequently opened, RexxMail prepares a separate sent message file which is opened on the desktop using the program specified on the 'Editor' line of the 'settings.txt' file.


© 2001 M.C. de Geus
Last updated 20010920