An Outlook Mystery

I think it’s the case that a lot of developers spend as much time in Outlook as they do in Visual Studio (or their IDE of choice). As a matter of fact, I’m fairly sure that there are more Java developers stuck using Outlook than there are MS developers who are on a different business email platform. (Because what’s the other business email platform?)

I’m writing this up because I just found a bug (in my workflow, if not in Outlook), and it had certainly bitten me a few times before. But, before I share what I found, I’d like to share a couple of Outlook observations.

  1. It looks like Outlook’s gone away in Windows 8, but that’s not true at all. People open up their Windows 8 machines and fire up all of the full-screen, touch-friendly, formerly-known-as-Metro Mail client, and find that they can’t really do as much as they could in Outlook. Well, Mail is free like Solitaire was, and Outlook costs $100. So there’s your answer. I think they still expect you to install Outlook if you need it, and you do.
  2. Outlook plug-ins are to be avoided. I don’t know if it’s Outlook’s API/SDK, or if QA is harder with integrated software like Outlook plug-ins, but I’ve had really bad luck with them, even if they come from Microsoft. (One exception would be the Evernote plugin, which does exactly one thing – save what’s on the screen to Evernote.)
  3. Folders are for the weak. If I see you fishing through a mess of folders (per project, per sender, per month) it makes me sad. Old emails are empty husks or shells: they contain information, and your job is (probably) to get the information out of there and put it somewhere useful. (Not a folder.) I did a lot of this, too, until Google Mail trained me to search instead of sift.
  4. Make only as many changes to Outlook as you will remember if you wipe it out and start again. It is frustrating and confusing that Outlook does not remember your email signature (this is an application setting) when you switch from one computer to another. Properly configured, it remembers every email you’ve sent and received for a decade, but if you deck out the customizable ribbons (y’know, like they made them customizable) that’s something you have to back up and restore yourself. I generally live pretty close to software defaults anyway, but this is one area where I’ve had my heart broken enough and it’s not worth it.
  5. Archive, don’t delete. Speaking of Google Mail and customizations, I also got trained to get everything out of my Inbox and into an Archive folder. This is one of the rare modifications I’ll do to a new Outlook setup. True garbage goes into Trash, but everything else should be in the Archive for searching. (Because sometimes you need to refer back to the empty husks of email to refresh your memory.)
  6. One weird email trick to save your career. My other must-have modification is to set a one-minute delay on every email I send out. 60 seconds to reconsider that snap answer, reword an argument, or recant the response to a meeting invite can make a huge difference. Follow these mail delivery delay instructions, probably, and you’ll thank me at least four times in the next year.

So what’s the hiccup? My problem has been with the last item: delayed delivery. Outlook implements this (client-side, frustratingly) by setting a “sent” time that’s one minute in the future. So it sits there in the Outbox, waiting for its sent time to arrive, and you can “unsend” it by simply opening it. When it’s opened, that unsets the “send” flag. (When you send it again, it sends without delay, so don’t count on getting another 60 seconds to change your mind.) And I was noticing that more than a few of the emails I would send would be stuck in the Outbox, not leaving. This has been going on for years.

And what’d I just figure out? It happens when you combine wicked search skillz with that delayed delivery. A search for an old email (about “teapots” let’s say) will pull up a list of everything in Outlook’s influence that contains that word, so Inbox items, Archive items, and even Drafts and Outbox items (and, arguably, it shouldn’t). And, like I said, opening or viewing an Outbox item unsets its “send” flag. What was happening was that the search window’s live preview was “opening” my just-sent email, ostensibly assuming I might edit it, I guess? And it didn’t happen all the time because I generally don’t send emails that match the search I have open in the background, but it happened often enough that I knew it was a problem.

I don’t have an answer for that problem (I’ll probably just stop leaving search windows open for so long), but I did get a blog post out of the deal.

On Overzealous Email Validation

Email address – Wikipedia:

Some mail services allow a user to append a tag to their email address (e.g., where is the main address, which would also accept mail for or The text of tag may be used to apply filtering and to create single-use addresses.

I see developers get this one wrong all the time. And, actually, they don’t get it wrong: they copy someone else’s regex or validation method, and never bother to test it. If I’m filling out a form online, I’m probably going to give you my Gmail address, and I’m probably going to inject “+yoursite” before the “@” symbol. That helps me track who’s abusing my trust.

But: you have a requirement to “reject” invalid email addresses. What’s a valid email address? Well, to get completely pedantic, lots of things are technically valid email addresses that you’ll never run into. This is one of those cases where I’d actually rather see a set of tests — good emails and bad emails — rather than a “requirement” (“email should be valid”) or the specification itself. (Are you doing anything useful with that email address? Are you confirming that it belongs to the user? Because if you can’t answer those questions, a vague requirement about “valid” emails is just a distraction.)

Truly, the requirement should be based on the audience and expected input. Are you creating a site where people might be typing in their username rather than their email address? (Do your users confuse their mailing address with their email address?) Protect yourself against the scenarios you’re likely to run into, and then pour your energy into other ways to make your form better. (Not writing the fix for the edge case that means an.”unusual\ example”@clownpenis.fart doesn’t pass, because I guess it’s a valid email address.)