MAIL_FWX: Filesystem plugin for Total Commander.
Purpose: Working with mail accounts.
Version: 0.99b6 (05.02.2007)
Author: Pavel Dubrovsky aka Antikiller.D1P (UIN 215168320)

Description:
The plugin is intended to work with mail accounts via POP3/SMTP directly under in Total Commander.

In the current version the following features implemented:
- Viewing information about the messages in the user columns without messages delivery (download only headers -> reduction of traffic).
- Removing messages from the server (DEL).
- Messages delivery with removing from the server (F6) and without removing (F5).
- Viewing size of a mail box without uploading messages.
- All messages are kept in *.eml format (see below).
- Message viewer.
- Message editor/sender.

Known restrictions (it all will be fixed... sometime):
- There is no confirmation on any operations, include existing files rewriting.
- The plugin is not able to work through a proxy.
- Time of last access for mailboxes showed as current (because there is no way to receive the true value).
- Messages encoding in plugin isn't processed in any way (i.e. messages with non-latin symbols can be viewed and saved incorrectly).
- May be problems under Win 9x (isn't tested).
- Some problems with mail sending.
- Some problems with editor in external application mode.

Plans for future:
- Add IMAP4 support (work with mail directly on the server).
- Add support of various POP3 authentification types (NTLM/RPA/MD5/etc).
- Add support of work through a proxy.
- Add address book, etc.
- Fix all bugs. :)

---

Plugin installation:

Use autoinstall function in Total Commander or install plugin manually in Total Commander configuration.

Plugin setup:
Go to Network neighborhood in Total Commander and select MAIL item, press Alt+Enter, plugin options window will be shown. It is possible to choose plugin interface language in the list on the bottom of the window (selected language is applied at once).
It is necessary to add one mailbox for work with the plugin. Press "Add" button, and enter new mailbox name. Created mailbox will be selected in the mailbox list. Enter mailbox parameters in corresponding fields and press "Apply".
You also can check a "Use this mailbox by default" option, and this mailbox will be used to mail sending by default.

Note:
All passwords are stored in the ciphered kind, but can be deciphered at the certain efforts. So, if you are afraid about your passwords safety, DO NOT save any passwords in this plugin! Just leave password field blank, and it will be requested each time, at you tried get access to this mailbox.

After you enter all necessary parameters, you can close this window, or add one more mailbox in the same way.

Hint: you can use these hotkeys shortcuts for mailbox editing (mailbox list should be focused):
Insert: add mailbox.
Delete: remove selected mailbox.
F2, Shift+F6 or double click: rename selected mailbox.
F5: copy selected mailbox.

After one or more mailboxes added, enter plugin file system. List of mailboxes will be accessible as directories. If you use TC 7.0 + the user columns mode (see further) will be used by default.
Further the following operations are possible:
Alt+Enter on the directory: editing of parameters of a mailbox.
Space on the catalogue: a calculation of the size occupied on a mailbox. This operation demands connection to the server, however transfer of messages does not occur.
F7 (MkDir): create new mailbox.
F8, Del: delete selected mailbox.

Enter to the directory, and messages headers will be downloaded. You can see all possible information about messages (sender, size, date, etc). You can work with messages like with simple files - copy, move, view with Lister and delete operations are supported. Copying files into plugin virtual file system are not supported.

Note: 
If operation require connection to the server, the corresponding parameters specified for this mailbox are used. If password wasn't saved in mailbox parameters, then it will be requested at first connection attempt.
You can check "Save password" option in request dialogue, and password will be saved in mailbox parameters (like as you enter it in options window). If this option will not checked, the password will be kept in memory up to the end of session (until you press "Disconnect" button).

Work with the user columns:
The plugin supports user columns. This function required Total Commander 7.0 or higher.
Default set of columns is automatically applied at the first start of a plugin. So, it is possible to create own set of columns from the following:

Attachment encoding: identifies the default encoding mechanism used for message parts.
Recipients: carbon copy recipients for the message.
Attachment MIME: identifies the MIME media type for the message.
Flags: flags of the message in format AFDXSR. It means: A) Answered - a reply has been sent for the message; F) Flagged - the watch flag has been set for a message or thread; D) Deleted - message has been deleted in the Mailbox; X) Draft - message is a draft and has not been sent; S) Seen - message has not been retrieved and read by the mail client; R) Recent - message has been added to the mailbox since the last time it was accessed.
From: identifies the original author of the message.
Organization: identifies the organizational affiliation for the message author.
Priority: identifies the message priority.
ReplyTo: identifies the delivery address for message replies.
Sender: identifies the sender of the message.
Subject: identifies the subject for the message. Two subcolumns there: Encoded (subject in plugin-determined encoding) and Original (subject in original encoding).
UID: message unique identifier.
MsgID: message identifier.
Cached: message cache status.

Messages editor:
The plugin have a message editor, also used for mail sending. Its interface, I hope, it be intuitively clear, therefore I just give the list of hotkey shortcuts:
Esc: close window (viewer/editor).
Alt+O: load message (viewer/editor).
Shift+Ctrl+O: load message to answer (editor).
Alt+S: save message (viewer/editor).
Alt+T: toggle always on top mode (viewer/editor).
Alt+A: add atachment (editor).
Alt+Enter: open viewed message in editor (to answer) (viewer).
Ctrl+Enter: send message (editor).
Alt+H: toggle headers view mode.

You can use built-in editor as the independent application. Just run TCMAIL.exe from plugin directory.
TCMAIL support next commandline parameters:

TCMAIL.exe "path\file.eml" [v] [a]

where:
path\file.eml - opened file path;
v - open in viewer mode (can be passed to open in editor mode);
а - create answer to opened file (can be passed to open file as previous saved).

Example of the TC toolbar button, which create answer to the message file under cursor:

TOTALCMD#BAR#DATA
C:\PLUGIN_PATH\TCMAIL.exe
"%p%n" a
C:\PLUGIN_PATH\TCMAIL.exe
TCMAIL
C:\PLUGIN_PATH

-1

---

Working with *.eml:
All messages in a plugin are submitted in a eml format. Eml is a simple text format, which can be looked through lister without any plugins installed (but you can't understand anything :))
The next ways possible to work with eml-messages:
1) Use internal viewer (Enter or Alt+Enter on selected message, depends on plugin options). This tool allow to see messages and work with attachments.
2) Press Enter on the message (in file system of a plugin (if corresponding option enabled), or on a eml-file in local file system). If some application (usually it is default e-mail client) is associated with this file extension, this application will be started and open this file.
3) Install wlx_eml plugin from Ivan aka Atlanoff. This plugin allows to look eml in a "readable" kind, and extract attachments from eml.
4) Use cm_Encode command on the eml-file. Total Commander will "unpack" the message, including all attachments. There we have some inconvenience - it is impossible to use the command inside plugin virtual file system, and it is impossible to apply the command on many files at once.

The additional information:
For work acceleration and traffic economy, plugin cached all received message headers. Cache updates each time at you open mailbox, so any out-of-date headers will not be used.
Cached headers can be found at the following path: plugin_dir\cache\mailbox_name\. You can see headers via Lister, or change files extension to .eml and use Lister with wlx_eml plugin.
Downloaded messages caching also possible. If corresponding option enabled, then all downloaded messages cached like a headers. In result there is an acceleration of repeated access to message, and traffic economy.
Messages don't cached on moving (F6) from server (because any operation with this message on the server are impossible) and on view via external application (because it is WFX API restriction).

---

GMail HOWTO:

GMail (Google Mail) - it is mail service from Google corporation. The basic feature of this service in that more 2 Gb of disk space to each account is given out (and this space increases constantly).
The plugin allows to work with GMail-accounts as with a usual mail box, but some adjustments are  necessary:
1) You must enable POP3 message delivery in GMail-account properties (via web-interface).
2) You must copy libeay32.dll and ssleay32.dll files to Total Commander main directory.
3) You must specify following parameters to your GMail-account in plugin:
Mail receiving server: pop.gmail.com
Port: 995
Username: your_gmail_acc_name@gmail.com
Password: your_password
mail sending server: smtp.gmail.com
Port: 465

Also, it is necessary to enable "Secure connection (TLS\SSL) option.

---

History:

v. 0.99b6 (05.02.2007)
* Previously saved message alvays opened as for answer.
* In some cases incorrect editor window position used.
+ "Clear headers cache on disconnect" option. If enabled, all cached messages will be deleted after "Disconnect" button pressed. In any case, this headers isn't used by plugin after disconnect, so you can save it only for your own needs.

v. 0.99b5 (03.02.2007)
* Some interface elements was invisible on enabled XP themes.
* Incorrect header From field generation.
* Some other fixes.
+ Save editor window size and position option.

v. 0.99b4 (02.02.2007)
* Some editor keyboard shortcuts are changed (because it conflicted with standard shortcuts)
* Fixed: messages with """ char in subject hasn't been accessed.
* Fixed: error with language file, which contains empty string.
* Fixed: errors with incorrect attachments generation.
* Fixed: incorrect header generation in some cases.
* More correct in message body generation.
* External mailer mode fixes.
* SMTP-authentification tested. It works =)
+ POP3-authentification: APOP-authentification added.
+ Message header viewing in editor (Alt+H to toggle).
+ Ctrl+Mouse Wheel changes font size in editor/viewer.
+ Ctrl+Gray+/Gray- changes font size in editor/viewer.
+ Main icons set changed to new, based on Opera browser Marina theme.
+ Toolbar buttons size and captions mode can be selected.
+ Toolbar gradient fill (optional).
+ Always on top mode for editor can be set by default.
+ Some other fixes and additions.

v. 0.99b3 (18.01.2007)
* Fixed: messages with "?" char in subject hasn't been accessed.
* SMTP-authentification bugfixes (but it still untested).
* Viewer icons removed (will be changed to new in next versions).
* Partial non US-ASCII charset support in message subjects. Now, if used charset not indicated, then plugin tried convert subject to system charset. It tested with KOI8-R, UTF8, UTF16 and seems to work fine.
+ Experimental SSL/TLS support (only POP3): GMail support.
+ Passwords encryption: Warning: all previous saved passwords MUST be reentered. 
+ Drag'n'Drop files to attachments list.
! Many known bugs still unfixed.

v. 0.99b2 (14.01.2007)
* Interface bugfixes.
* Attachment list bugfixes.
* It was impossible to send message if default mailbox hasn't been chosen.
* TC 6.x. compability (some TC bugs has bavoided). 
+ %commander_path% and %commander_drive% support in attachment default savepath.
+ User columns changes: "Date" column removed (because standard datetime column show same info), "Charset" column added.
+ SMTP-authentification (isn't tested yet).
+ "Close after message sending" option added.
+ Del in edited message attachment list deletes selected items.
+ Built-in editor can be executed as external application (via TCMAIL.exe).
! First public beta.

v. 0.99b1 (13.01.2007)
* Some interface fixes.
+ Connection timeout option.
+ Problems diagnostic (POP3: output to TC FTP panel; SMTP: output to own dialog);
+ Message sending progress dialog.

v. 0.991a (12.01.2007)
* Pressing Esc in editor window cause error sometimes.
* Some fields in editor will be black under some XP themes.
* Messages caching error still unfixed.

v. 0.99a (12.01.2007)
* User interfase fixes.
+ Message editor added.
+ Mail sender (SMTP support).
! Caution! This version is still very early alpha-version, for testing only. Dont use it for usual job.

v. 0.92a (09.01.2007)
+ Unsaved changes indicator in mailbox options added.
+ New user columns: UID (message unique identifier) and MsgID (message identifier).
+ New user column: Cached. It displays message cache status (in cache or not). Sometimes cache status displayed incorrectly (because caching operation is done slower than TC refresh message list).
+ Language files: slovak.mpl (from Jozef Kundlak), polish.mpl (from Dariusz J. Kawecki), german.mpl (from Alexandre Mayor), danish.mpl (from Peter H. S. Madsen).
* Serious changes and bugfixes in caching mechanism.

v. 0.91a (08.01.2007)
* Fixed list index out of bounds bug on options saving.
* Fixed bug with directory selection dialog.
* Messages caching bugfixes.
* Some interface bugfixes.
* Internal viewer bugfixes.
* Some other bugfixes.

v. 0.9a (07.01.2007)
* "Apply" button in mailbox options become activated only after modifications.
* Sorting on all user columns works.
* Language files extension changed to *.mpl (to avoid problems with user columns translation).
* SMTP options unlocked (though do nothing).
+ XP style support.
+ Mailbox copying (via F5 or context menu).
+ Make directory in plugin filesystem makes a new mailbox.
+ Removing directory in plugin filesystem removes a selected mailbox.
+ Messages caching (optional): all downloaded messages cached like a headers -> mail access acceleration and traffic economy.
+ Progress displayed at an entering to mailbox. Operation can be cancelled, thus work with already received letters will be possible (very useful for slow and unstable connections).
+ Message viewer added.
+ Viewing and saving attachments in internal viewer added.
+ Plugin behaviour on messages opening (Enter) and on properties viewing (Alt+Enter) can be adjusted.

v. 0.7b (05.01.2007)
* Empty mailbox list showed correctly.
* Options window changed, and Alt+Tab window loss bug fixed.
* Now possible to add additional info (like "about author") in localization file.
* All standart input dialogs changed to self-written.
* Shift+F6 shortcut added to rename mailbox.
* Default user columns view changed.

v. 0.7a (05.01.2007)
+ POP3 support.
+ Work with unlimited mailboxes amount.
+ Password request, if it is not stored.
+ Uploading progress showed.
+ Show some info in TC log panel.
+ Viewing the information on messages in пользорвательских columns (TC 7.0 +).
+ Message headers caching.
+ Localization via .lng files.

---

Wishes and bug reports are accepted on ICQ UIN 215168320.