Hastymail2

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

Code Updates for January 28

    So many things have been added over the last 2 weeks it would be hard to list everything. Here are the highlights of whats new:

-  Functional pages now include the mailbox view, the message view, the about page, the options page, and the new mail
   page.

-  the IMAP class methods have been improved and more widely tested. We are still experiencing some sorting problems,
   but aside from that things are looking very solid. Recent improvements include the ability to limit the amount of data we
   receive from the IMAP server in response to a query. Ever receive a failure notice or broken message in which that primary
   text is over 1-2 MB? I have and it normally will kill a webmail client session when it tries to send so much text to the
   browser. This ability to control the read amount on a message part selected for viewing allows us to truncate the message
   and inform the user.

-  An interesting but simple internal tag system is in place. This lets us remove parts of the HTML output just before sending
   to the browser. The initial intent of this system is to allow us to create a simple mode interface for phones and PDA's
   without having to dot the code with "if ($simple)" statements. Instead we next portions of the HTML we don't want sent
   to these browsers with specific tags and those bits of HTML are removed by the filter system automatically.

-  New theme/templates system. Not yet complete but when it is I think it will offer sites easy customization ability with
   varied levels of modification.

    Each theme has a unique name and is assigned 3 attributes. The attributes are "icons",
   "css", and "templates". The css and templates options are true/false.

   If css is set to true then the main css file used is in
   /hastymail2/themes/<theme name/css/site.css

   if templates is set to true then the templates used for pages are located at
   /hastymail2/themes/<theme name>/templates/

   If either is set to false the default css file or template set is used. The css file controls much of the layout and all of the
   colors and style. Themes can have there own images directory for any image used in the css file. The templates contain
   the outer divs and tables for most "sections" of a page (still a work in progress). For example the message template has
   the main structure of the message view page but uses a series of print_ <something> methods to insert the real
   dynamic parts. Except for where used by javascript to toggle visibility the output of the print methods contains no
   inline style, only html, some with classes/ids.. All pages start with the main.php template which handles rendering the
   main page layout. The idea behind the template design is to give sites a limited but still powerful control over the
   layout (more than available with only the css), but at the same time to be reasonably simple to edit and not cluttered
   with logic. Once complete the default theme will have comments in the css and templates and be the basis for
   building new themes with.

   The  icons setting can be set  to true, meaning the theme has its own icon set at
   /hastymail2/themes/<theme name>/icons/

   To create an icon set one need only replace the images with new ones that have the same names. Setting icon
   to false results in no icons being used at all, and setting it to "default" allows the theme to use the default icon
   set.

-  Several session related changes made in an attempt to streamline the configuration system.

-  New site configuration file support. Like hastymail 1 this is a simple name = value ini style configuration file.
   lines with comments are preceded by a #. The site configuration is saved after login in the session so we don't
   have to incur overhead of re-parsing it on each page load.

-  Managed to get apd installed in PHP 5.  While it would frequently start segfaulting apache I managed to get some
   output from it and identified a few areas that needed improvement. I found a nice regex that helps
   us avoid the serious utf8 to html routines when the string does not require it. Also I combined some files to minimize
   includes. Unless we are first time sorting a 3K message mailbox including PHP files is a top time waster.
   The result was a nice decrease in overall page render time.

-  Up next I am going to be working on getting the folders page put together and adding folder related functions to the
   IMAP class. Meanwhile there is work being done on an SMTP class for sending messages. I would also like to get some
   initial plugin ideas rolling in the code to see how we can build a nice add on system. 

 

 


Images
preview
New message view
preview
New mailbox view
Comments
No comments posted yet

Add a comment

Name:
Email:
Subject:
Comment:
Security Image:
security image
Enter the letters you see above.


 SourceForge.net Logo