Search Results in /dev/blog/
Email comes in all shapes and sizes, from complicated nested multi-part structures to simple text bodies. But even messages comprised of just plain text require special preparation to safely and properly display from within a webmail application. For security purposes any HTML within a text message needs to be converted to appropriate entities. Using the CSS "white-space: pre;" setting is effective as well, the CSS equivalent of <pre> tags, but this makes word wrapping the message in such a way as to ensure that the webmail interface remains consistent very tricky. Neither approach is ideal (entities vs pre-formatted), and both suffer from some similar display problems. For example a line containing 200 characters in a row with no spaces, such as a long URL will either spill out from it's containing div or expand the width of the page to force a horizontal scroll bar (yuck). To further complicate the situation we need to be able to create links to both urls and email addresses within the text as well as highlight reply quoted sections, not to mention take into account converting the original character set to UTF-8 for display in the page. For Hastymail 2 I have been working on a new system that preps the text body in such a way as to address all of these concerns and creates a situation in which the text is wrapped by the browser automatically for almost any practical resolution without spilling out of its container and without horizontal scroll bars, and without a user setting that defines the maximum line length, all the while maintaining the intended format of the original message as closely as possible within the constraints of the presentation medium.
Maybe it's the new year getting to me. Holidays always seemed so contrived after reaching adulthood, as if rather than celebrate human achievement or spread good will the experience instead is commercial and fabricated, but as I start to slide into my late 30's I'm as sentimental as a child. Worse even I get choked up at times for literally no reason at all. Seems even a Mountain Dew commercial can bring a tear to my eye. Whatever the cause I have decided to dedicate some time to Hastymail development again.
I think the phrase "Web 2.0" is for the most part universally despised, and I wholeheartedly subscribe to this point of view. While it may be fluffy market speak it does carry a meaning to me, a vague and over hyped meaning, but a meaning none the less. When I work on client sites I will suggest using AJAX or a more interactive design if doing so is a good fit for the site and overall functionality. More often than not however clients will ask for dynamic parts of a site, even going so far as to say "I want this page to be more AJAX-y". Over the last few years I have been involved with and written quite a few different dynamic and interactive web site features. Thanks to great packages like Sajax, Prototype, and Script.aculo.us among others, adding varied levels of web 2.0 goodness while keeping an eye on overhead and bloat is not too difficult.
Hastmail 2 has kicked off with a bang. And by bang I mean a bunch of late night coding. We have svn setup for the new code at sourceforge, and porting useful Hastymail 1 code has begun. The framework we are building from provides many basic web application mechanics, so the porting effort is focused on the back end functionality, like talking to the IMAP and SMTP servers. So far almost 1/3 of the IMAP related code has been ported, reviewed, and improved. I'm excited! I have yet to determine a satisfying metaphor to describe what it's like coding to the IMAP rfc, but when I do it will be rife with ambiguity if nothing else. Having not dug into the bowels of that dastardly document in a few years I almost washed away that clinging chill it evokes that eats away at your belief that you can read and understand the English language. Here is quick list of tips for anybody diving into the verbal quagmire that is the IMAP protocol RFC:
Having decided at the new year to revive the Hastymail project (a neglected PHP webmail client I wrote years ago), I set out to improve the project website in a few different ways. First I moved it from the sourceforge web hosting to a private host, changing the site name from hastymail.sourceforge.net to good old www.hastymail.org. Many thanks to ThinkHost for generously donating the hosting to our project, and to David Schaefer for safe guarding the hastymail.org domain name for years in the event that we would someday need it. Secondly while the code is still managed at sourceforge, and we will continue to support any use of the sourceforge trackers and feedback tools, we now have some nice feedback and discussion facilities at our main site as well.