Hastymail2

Hastymail2 is an Open Source IMAP webmail client written in PHP. Our focus is compliance, usability, security, and speed.
     

Code Updates for October 21

    I am happy to say it has been a busy 10 days in Hastymail-land since the last update. We have only a few new entries in the CHANGES file but they are significant and worth mentioning. First up is a new plugin called js_sign. This plugin converts the "Sign" button on the compose page from a normal HTTP POST form submission into an AJAX call that inserts the signature into the in-process message at the current cursor position. Also new is an enhancement to the plugin system that allows plugins to register javascript event handlers without stomping on any core Hastymail events or those supplied by other plugins. Finally we have a new option that enables periodic AJAX updates of the mailbox view when the folder dropdown/list is updated.

   The js_sign plugin is something I have been tinkering with for a while. Personally I prefer "bottom" or "inline" replies in email correspondence, however as a part of my work I have to top post because the people I communicate with might otherwise miss my response altogether :)  Since I use Hastymail for this the normal signature behavior is less than ideal because it appends the signature to the end of the message. After signing I have to spend time cutting/pasting the signature to my top post reply. With this plugin the signature is inserted where ever I leave the cursor and without a page reload. While it may be a small change I am already thankful for it. Combined with the new auto_address plugin the compose page is really getting easier to use. There has been quite a bit of bug fixing and tweaking to the auto_address plugin since the initial release and it is really shaping up. Both it and the js_sign plugin should work in current versions of Firefox and IE. We have 15 usable plugins now, with quite a few well tested and near feature complete. Only one of these is enabled by default in the hastymail2.conf file (the compose_warning plugin). So if you are using Hastymail and have not checked out the plugin selection of the conf file you should give it a look. A break down of the plugins is also available on our Plugins page.

   While developing the js_sign and auto_address plugins I ran into problems with javascript event handlers overwriting each other. To solve this I implemented a sort of crude solution that allows plugins to register an event handler by specifying the DOM element, the event (eg "onclick"), and a callback function. In the page output the callbacks are defined in the HTML HEAD in a window.onload event function. They are passed the javascript object that received the specified event as an argument, and each has an element check and try/catch blocks around the callback function to keep defective plugins in check. Handling multiple return values for the same element and event is tricky. Currently a single return value is overwritten by each event handler, and the last one is returned for the overall event. The order follows the hastymail2.conf file plugin entries. Almost all of the javascript events in the code are converted to use the new system and the rest will be soon.

   The last change, mailbox view updating via AJAX, is actually the most intrusive since it is primarily additions to the core Hastymail code instead of limited to mostly plugins. It is however disabled by default and requires users to check the "Update when the folder list updates" setting in the Mailbox View section of the Options page.  Then, when the folder dropdown/list does it's AJAX update (another Options page setting in the Folder section), the mailbox list will update. The update only happens if the contents have changed or if the force_page_update value is reached. This force_page_update also affects the New Mail page updates and defaults to 5 minutes. It is tunable via the main index.php file

   We also have an updated version of tinyMce for the html_mail plugin, updating to 3.2.7 from 3.2.1. There are a few bugs left to address but I hope to do that this weekend and put together another RC release shortly thereafter. Thanks to everyone for feedback and support.


Images
No Images with this post
Comments
No comments posted yet

Add a comment

Name:
Email:
Subject:
Comment:
Security Image:
security image
Enter the letters you see above.
Get Hastymail at SourceForge.net. Fast, secure and Free Open Source software downloads