Background

The last mobile for which I shelled out some cash was the Sony Ericsson K700i. It's a nasty, cheap, appallingly-made little device, purchased only because it was, at the time, Vodafone CZ's lowest price offering with Bluetooth.

Admittedly, I am particularly tight when it comes to spending my own money on phones - caused partly by the resentment I feel towards the planned obsolescence that's inherent within every handset on the market; but mainly, if I'm honest, thanks to my employer's generosity in keeping me knee-deep in new toys for which I don't have to pay.

When I buy my own phone with my own hard-earned cash, there are only really two things that it has to do to keep me happy: 1) Make phone calls; and 2) Let me check my Email. But being able to do the latter of these two activities still, bizarrely, seems to surprise and impress all of my friends who have the latest and greatest shiny Scandinavian communicators.

Technologically, the tools required to send and receive Emails from mobiles have been around for donkeys' years: GPRS and a built-in web browser. You'd be hard pressed to find a phone still in existence which didn't have them. And yet, only the barest minimum of people actually seem to be Emailing on the move - mainly, those who've spent a lot of cash on a Blackberry, had their company's IT department set it up for them, and who have an enormous monthly data bill thanks to every Email being pushed to them wherever they happen to be. And if they go abroad, they either end up with a seriously inflated bill, or just disable the facility entirely.

About the Code

ChrisLacey.MobileEmail.Web is a trivial bit of code which, when hosted on a .NET web server, will enable you to send and receive Emails with the cheapest phones whilst invoking the smallest possible data transfer costs.

It's built with the one priority of being functional, whilst using the minimal possible amount of bandwidth. Each page is generally under 2KB in size, and contains the smallest amount of information to be useful:

  • inbox.aspx lists the ten most recent Emails in your mailbox (configurable), and excludes any messages from specific senders or with specific subjects that you regard as junk (configurable)
  • Clicking on a subject displays the first 1KB of the message - usually sufficient to gain enough information from it, and preventing you from needlessly downloading endless signatures, disclaimers, and the chain of conversation at the bottom
  • Clicking on the sender's Email allows you to enter a reply; your signature and the original Email are automatically attached to your response on the server-side before sending, such that it's usually hard to tell you haven't replied from your normal desktop Email client.
  • Links are provided for browsing back through older Emails, downloading full message bodies, and composing new Emails, so that full functionality is available if you choose to use up extra bandwidth.

The security model in use is one that would undoubtedly raise the eyebrows of a network manager or two, but it's one that provides the correct balance of utility and security for the kind of messages I receive. The password (optional) is supplied by means of a querystring on the URL, enabling you to bookmark it in its entirety, and not forcing you to stop to enter a password every time you connect. It's also possible to tighten things up a little by restricting access to certain hosts (e.g. vodafone.cz if you want to limit its use to a single phone network).

This model is right for me because my principal priority is checking mail quickly, and the implications of somebody hacking into it are minimal - I don't tend to receive many messages which might compromise national security. But, depending on situation, that won't necessarily hold true for everyone and so it's worth noting that, should someone steal your phone or sniff traffic on the network, there will be a chance of your messages being compromised until you get round to changing your password.

Download

10 Jan 2008 v1.1 ChrisLacey.MobileEmail.Web.v1-1.zip
Fixes problems when replying to HTML messages
18 Nov 2007 v1.0 ChrisLacey.MobileEmail.Web.zip

All source code is distributed as public domain. Please feel free to distribute and modify for your own purposes without restriction.

The Chilkat Email component is copyright Chilkat, hence the package cannot, unfortunately, be released as free software. Please do not use this component for any other purpose without purchasing a developer licence from Chilkat.

Configuration

signature.txt

Simply place any required signature within this file. It will be automatically appended to every Email sent (new messages and replies).

Web.config

The appSetting keys are as follows:

BlockedFromAddresses A regular expression containing addresses from which Emails should not be listed in inbox.aspx. Bug: if this expression is left blank, then ALL Emails will match the expression, and ALL will be ignored. Workaround: Enter an unlikely combination of characters!
BlockedSubjects A regular expression containing Email subjects which should not be listed in inbox.aspx. Bug: if this expression is left blank, then ALL Emails will match the expression, and ALL will be ignored. Workaround: Enter an unlikely combination of characters!
Clients If set, only a client whose DNS-resolved name contains one of the specified values (separated by semi-colons) will be permitted access. Example: vodafone.cz;aol.com. View client.aspx on your mobile device as a handy way to see the host through which you're connecting.
FetchBatchSize The number of Emails headers retrieved from the POP3 server, before the above pattern matching in BlockedFromAddresses and BlockedSubjects is applied. If you're not blocking any Emails, then for optimum performance, this should be the same value as MessagesPerPage
FromAddress Address from which Emails should be sent
FromName Name from which Emails should be sent
MessagesPerPage The number of Emails to show in inbox.aspx
Password If set, all pages require &pw=<password> in their querystring
PersistentBcc Addresses (comma-separated) which should be BCC'd in on ALL sent emails, in addition to those specified in compose.aspx
PopPassword POP3 password
PopServer POP3 server to query
PopUsername POP3 username
SmtpServer SMTP server for sending Emails
SmtpUsername SMTP username
SmtpPassword SMTP password
© Chris Lacey, 1997-2011. Home page | Contact details