The past week was not the most productive for Hastymail development, but definitely an improvement over the last few. There are a handful of fixes in various places as well as continued work on the new configuration and plugin systems. Considering how much Hastymail2 can already do, I am pleased with how compact the codebase is. The overall organization of the code uses a system I have been developing for a long time. A primary focus is limiting php include size, both through re-usable and efficient code but also by excluding files from being included when not required by the page request. For example if $_POST is empty a 1500 line include file that contains methods for dealing with submitted forms is not included.

Running a few find commands on my working copy of SVN produces the following:

Comparing these numbers with Hastymail 1 is not really applicable for a number of reasons, and I expect the remaining SMTP and MIME code to be a decent chunk of work. With that said I think the first official release of Hastymail2 will still be well under 1/2 the size of the 1.x code.

Here are the highlights from this weeks SVN updates:

- Finished the new configuration system. Well not exactly finished but it is functional. One thing I worry about is using a PHP CLI script as a part of the install. This obviously won't work on setups in which the administrator only has ftp access. We gain a lot by using an intermediate process of some sort to parse the ini style hastymail.conf file and then store the results in a serialized array, so with some slight modification I think I can create a normal php version of the install script to accompany the CLI version. I also plan to host a public version of this script at this site so admins can use it to create there configuration file if they are having trouble with the local versions. It would be neat to add some debugging information as well, such as notices about php5 only options and the like. Regardless the new system works well and nicely centralizes a lot of things. I also reformatted the index.php file for readability. Not a big deal but it is the only file a non-programmer might find the need to edit (I hope).

- Fixes to nested message part headers. When viewing a message part that is inside of an rfc822 attachment we display a second set of headers, below the primary headers, that is taken from the rfc822 message attachment. This was broken when viewing a message part with more than 1 level of nesting. I noticed this on a bugtraq digest message and the fix corrects all the incorrect handling I observed.

- Fix for transparency support in image thumbnails. Might not be used much but I noticed a few image attachments that when resized lost there transparency causing those areas to be replaced with an ugly solid black.

- Profiles system fixes. The profile system had all kinds of problems. I rewrote much of the logic. It is more usable now and because of the rewrite should not suffer from problems with incorrect escaping like it did.

- Add and remove folders to the new mail page. This is a pretty neat new feature that lets you select which folders to track unread messages in right from the new mail page. Its easy to use and more visible than navigating to the "folders" page to select which folders to view on the new mail page.

- Plugin Hooks. Added tons of display hooks and a few work hooks. Also documented them in the docs directory (plugins_display_hooks.txt and plugins_work_hooks.txt). There are now approximately 70 display hooks that a plugin author can use to insert XHTML into the application, and 15 work hooks that allow a plugin to do backend work. I plan on expanding the work hooks to probably 40-50 to start. Hooks can be added and removed easily so as plugins are developed we can identify and add them to useful locations.