mxMail - Introduction and Copyright

mxMail - an X11/Motif(tm) based Mail-tool (for Linux)
Copyright (C) 1997 Andy Jefferson

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either Version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Author:	Andy Jefferson			Analyst/Programmer
E-Mail: andy@ajsoft.demon.co.uk		AJ Soft Limited,
URL   : http://www.ajsoft.demon.co.uk	4 Southwood Street,
Phone : +44 (0)1332 601114		Derby DE24 8TY
					United Kingdom

Description

mxMail operates around a basic SMTP capability on the host machine - namely
'sendmail'. It uses 'sendmail' for sending out of new mail, and looks in a
specified file for incoming mail. The incoming filename is user controllable.

There main panel consists of four areas. These are :-
a). Menu bar - containing all options available within mxMail.
b). Tool bar - containing the most often used options.
c). Application Logo - this is animated to reflect the checking for any new
    mail messages, and of new messages arriving.
d). Mailbox container - showing all currently open mailboxes. Double-clicking on
    a mailbox opens up its display, showing the messages contained within it,
    together with the currently selected message.

File Menu - consists of 'Open Folder', 'Close Folder', 'Delete Folder' and
'Quit' options. The 'Open Folder' prompts for which folder to open, and when
entered, the folder appears in the mail box view area. The 'Close Folder' option
closes all currently selected folders. The 'Delete Folder' option closes and
deletes all currently selected folders and constituent messages, after
acceptance of a confirm prompt. The 'Quit' option quits the application.

Message Menu - consists of 'Compose Message' and 'View Addressbook' options.
'Compose Message' brings up a message composition panel. 'View Addressbook'
allows viewing of the mail addressbook.

Mail Box Display

This display is brought up when double-clicking on a mailbox, when it has
messages within it (if it has no messages then it won't open).

At the top of the panel there is a list of the available messages, showing size,
author, title, whether the message is tagged for deletion, and whether a
message is 'new' or has been read before.

Below is a display of the currently selected message in the list. It splits the
message into three areas - header, body, and attachments. If no attachments are
present on the message then the attachments section will not appear. Also
shown are Print and File buttons allowing the selected message to be filed, or
to be printed to the default 'lpr' printer.

At the foot of the panel are an array of buttons providing control over many
aspects of the display. These are
Close - close the display
Delete - tag the currently selected message for deletion. A 'Del' will appear
         in the list next to the message when it is tagged for deletion. The
         message is only deleted when the panel is closed.
Undelete - removes any delete tag from the currently selected message. The 'Del'
           will be removed from the list.
Forward  - starts up a compose panel with the selected message as an attachment.
           This allows you to forward the selected message on to other people.
Reply    - starts up a compose panel with the selected message indented in the
           message text area allowing you to comment on the selected message
           text, and send it back to the original author, and on to other people
Copy     - Copies the message into a different mailbox. You are prompted for
           the other mailbox name.
Move     - Moves the message into a different mailbox. You are prompted for the
           other mailbox name. It actually tags the selected message for
           deletion rather than just deleting it immediately.
New Mail - when this button is not 'greyed out' it signifies that new messages
           have arrived for this mailbox since openeing it, and pressing the
           button will load them into the viewer.
Sort by Date    - sorts the messages in the list by date (with earliest date
                  first)
Sort by Author  - sorts the messages in the list by author's name (lowest
                  alphabetical name first).
Sort by Subject - sorts the messages in the list by the subject of the message
                  (lowest alphabetical order first).
Sort by Size    - sorts the messages in the list by size (smallest size first).

Mail Message Composition

This panel allows you to compose a message to send to people. You specify
the addressees, enter the message text and can add optional attachments (maybe
images, audio files, or applications).

To specify the addressees you can use the addressbook to select these (if they
are in your addressbook), or you can enter them manually.

When you have added an attachment you can inspect the content of that attachment
if it is a 'file' or another 'message', by double-clicking on it in the display
area. This brings up a panel displaying the file/message.

Mail AddressBook

This panel provides a list of the addresses in the addressbook. It displays
the aliases as a list showing some relevant information about the alias
alongside it. Additionally, if an alias is selected (by clicking the mouse) the
details are displayed below in the text fields.

mxMail Setup

Allows configuration of numerous mxMail (and other 'mx' application)
parameters. The parameters that are configurable for mxMail are :-

Sender Mail-Address
		This allows the user to set the mail address that appears
		as the 'from' in the mail message. Useful when you maybe
		have one E-Mail address internally and have a separate
		address externally (maybe for a dialup connection).

Inbox Filename
		This is the name of the file that is scanned for incoming mail
                every 'n' seconds. It is the file where mail is usually
		deposited by e.g 'sendmail'.

Outbox Filename
		This is the name of the file that any composed mail is copied
                to - so keeping a record of mail you have sent.

Addressbook Filename
		This is the filename of the addressbook that contains
                any aliases used by mxMail in its mail sending.

Spambook Filename
		This is the filename of the 'SPAM' book that contains
                the mail-addresses of known SPAMMER's that you do not wish
		to receive mail from - these messages will be automatically
		deleted.

Signature Filename
		This is the filename of the file used to contain a 'signature'
                that is tagged at the end of any mail message sent by mxMail.

Folder Directory
		This is the name of a directory that contains all of the
                mailboxes (other than the Inbox and Outbox).

Read Inbox-Messages Folder
		If this is specified, any mail in the INBOX that has been 'read'
		when the mailbox display is closed, these messages are moved to
		this folder.

'sendmail' Binary Filename
		This is the fully-specified name of the 'sendmail' binary. If
		'sendmail' is stored in /usr/sbin then this is
		'/usr/sbin/sendmail'

Startup Folders
		This allows the user to select several 'folders' to be
                automatically opened on starting up mxMail.

Message Indent String
		This string is used when replying to messages - the original
                message is indented with the specified string at the front of
                each line.

Mailbox Check Interval (sec)
		How often the Inbox is checked for new mail.

MIME format
		Controls the format of any messages sent by mxMail. MIME is the
		internet standard for SMTP mail messages, and defines methods of
		attaching files/messages that can be understood by other MIME-
		compliant mail tools. If the party you are mailing hasn't got
		a MIME-compliant mailer, set this to 'disabled'.

mxMail Help

Invokes the help viewer displaying this file.

Future Plans and things to note

Currently doing nothing about checking for correct colormap allocation of required colors. As a result, if you have something like NetScape running, you may well run out of colors. mxMail/mxFtp/mxNet together require about 20 colors. Also, look at the file FUTURE that will have come with this application for a list of desirable items. The main one is likely to be conversion to Java, and allowance for mail 'threads'.

About mxMail

mxMail is a program written for Linux using X11R6/Motif2.0.
It is designed for reading and sending of E-Mail.

It operates around a UNIX file structure, and uses 'sendmail' to send
e-mail messages. It's defaults for in-box, out-box, addressbook etc are
derived from the standard LINUX file system setup, as well as naming
conventions used by such as ELM and PINE. It provides various configuration
options to tailor usage to your own file system.

Source Code comments

To build mxMail, you require

1. Motif 2.0 (or later) 	since it uses widgets from Ver 2.0 
				(Notebook, Container, ComboBox)
2. X11R6
3. C++ compiler 		I used g++/gcc ver 2.7.2
4. Libraries			I used	libc	 5.3.9
					libg++	 2.7.1.4
					binutils 2.6.0.14
					ld.so	 1.7.14
5. Memory			Depends on no. of mail messages in boxes
				Typically < 1 Mb unless read in significant
				no of messages. Memory is dynamic, so is in
				direct relation to no., and size of, messages.
				Only the message HEADERs are read in until a
				message is opened (and then only the TEXT
				for that message is read in). The TEXT is freed
				after the message is closed.
6. Binary format		Provided binary is ELF.
7. Make				Makefile is set up for a system with X11R6 in
				a SEPARATE directory to Motif2.0 - strange why
				the Motif people insist in dumping libs in X's
				directory, and hence mixing up 'packages'.
				Shouldn't need much to adapt it to any setup.

The various classes that make up mxMail are 'loosely' based on the
Model-View-Controller(MVC) architecture. Typically, in mxMail, the View and
Controller together form a class, and the Model is the data that they are
representing. The only real difference is that the View's are NOT registered
with the model's and providing the model's with the control to update their
own views (the View/Controller objects update the Model and their OWN view
instead).

The classes are :-

mxMailMsgHdr		- A mail message 'header' defining the header tags, as
			  well as position within a mailbox etc. Used
			  primarily by mxMailBox as a way of identifying
			  messages without having to read in the whole text etc.
mxMailMsg		- The basic message data, including header, body and
			  any attachments.
mxMailMsgDisplay	- A display of an mxMailMsg object. Displays the message
			  as three sections - header, body, and attachments.
			  Provides Print and File functions. Operates in two
			  distinct modes - display and compose. As a result
			  it is used for displaying of messages and creation of
			  messages (mxMailCompose).
mxMailMsgViewer		- A viewer for an mxMailMsg object. Displays the message
			  as a panel using a mxMailMsgDisplay object.
mxFileViewer		- A viewer for a text file. Displays the file in a
			  scrolled text area.

mxMailAttachment	- An attachment to a message - can be either a message
			  or one of several types of files.
mxMailAttachmentSpecify	- Provides a means of prompting for a file
			  attachment for a message.

mxMailBox		- Consists of an array of pointers to mxMailMessage's
			  Also provides for reading/writing of the mail-files
mxMailBoxDisplay	- The Controller/View for the mxMailBox class.
			  Provides a display of the mailbox using XmList
			  and XmNotebook widgets.
mxMailBoxControl	- The top-level representation of the mailbox.
			  Mailbox represented as an icon - double-click it
			  to view its contents.

mxMailSpamBook		- An array of mail-addresses of known SPAMmers that you
			  don't wish to receive mail from.

mxMailAddress		- An address for mailing (alias,name,mailid)
mxMailAddressBook	- An array of pointers to mxMailAddress's etc
mxMailAddressView	- The Controller/View for the mxMailAddressBook
			  Displays the contents of the book, and provides
			  control by way of add/modify/delete/sort options.
mxMailAddressSpecify	- Display providing for selection of addressbook aliases
			  for use in Compose as 'To', 'Cc', or 'Bcc'.

mxMailCompose		- Provides for sending of mail. Uses an mxMailMsgDisplay
			  object to prompt for the message details. Includes a
			  pointer to the addressbook - for resolving aliases.

mxSetup			- Setup class for mxMail (and other mx applications).
			  Stores setup parameters. Provides read/write methods
			  for extracting setup data from files.

mxMail			- Main window class for mxMail. Contains an array of
			  mailboxes which are displayed as icons within a
			  container.

mxMailLogo		- Logo class for mxMail. Takes care of the animation
			  of mail checking and mail arrival, as well as the
			  associated audio sounds.

mxMailApp		- Application class for mxMail. Creates a global
			  mxSetup object.

mxQuotedPrintableString	- Caters for quoted-printable encoding/decoding for MIME
mxBase64String		- Caters for base-64 encoding/decoding for MIME