Lotus Notes – how to build the perfect email

Lately work we have had to build numerous email newsletters (e-zines, and sometimes even “eFlyers”?!) with a huge amount of content and very image heavy. The number and frequency of these emails mean a challenging turnaround time and the use of templates of previous email wherever possible.

However the client dropped a massive bomb shell when it was revealed that they (as a large corporate company) use Lotus Notes 5 as their primary email client. This is bad.

Not only does this mean we have to output a huge amount of work but it also means that this work must be absolutely indestructible, unbreakable code.

If you look at the following examples of emails displayed between Lotus Notes and Microsoft Outlook, you can see how perfectly valid and working emails can be slaughtered left, right and center by the Lotus Notes HTML rendering engine.

Sony emails.

Sony email which uses styles quite heavily. While this means that the email will not display as designed in email clients that do not support CSS (Gmail, Notes amongst others) at least it will degrade gracefully.

Hugo Boss emails.

This Hugo Boss email doesn’t use any style for any layout or formatting byut still breaks quite badly.

My preferred method would be that of Sony, or even plain text emails – which a recent .net podcast (episode 19) said most people surveyed would prefer to receive. Unfortunately the limited technical experience of marketing staff that have to sign off these emails mean that we have to make the emails work in Notes if possible, even if the actual recipients receiving the email in Notes is minimal.

There are a number of methods that can be used to make sure you emails display as planned in Lotus Notes and hopefully the trials and tribulations I have endured for the past year can be kept to a minimum for others by following these rules.

  1. NO BACKGROUND IMAGES

    They just don’t work. This doesn’t just apply to Notes, but also includes other well know email clients. This should be a general rule for all HTML email builds.

  2. ALWAYS SET OUT TABLE COLUMNS FIRST

    No matter whether widths are set on the

    tags themselves, it has always helped me to have an empty row right at the start of every single table, with 1px in height spacer images defining the table cell widths.

  3. NEVER EVER USE ROWSPAN

    Now I don’t know why this doesn’t work, but it proved to be a thorn in my design for a long time. I find that the only way to guarantee the reliable display or a table exactly as it should be is to ignore that rowspan even exists and insert tds in every row wherever required.

  4. DON’T SPLIT IMAGES HORIZONTALLY

    If you have a wide image, don’t split it across a row. This often results in extra space for no apparent reason, stretching the table row containing the images. Even if you have distinctly separate images, if you can get away with just using one full row width image then do it. And fight to keep it that way.

    If you absolutely have to split images horizontally, each must be in its own table cell, because even with absolutely no whitespace in the code, Lotus adds a single character space between each image.

  5. USE NO STYLES

    In my emails, I usually set text size at 11px or 12px using a style in my font tags to get around a link and copy size bug in hotmail. However Lotus Notes ignores this, and ALL other styles. So use no margins, padding font declarations, in fact use no styles at all. Go back to the early 90s, when CSS didn’t even exist!

    Since I still like to make sure the link and surrounding copy are the same size in hotmail, I still define font size, however use 13px with a size="2" back up in the font tag (or 10px and size="1").

  6. DO NOT USE P TAGS

    Lotus Notes doesn’t recognise the margins that should apply between p tags, so I find that declaring a font tag then using spacers to separate copy blocks, as follows:

    <font face="arial, verdana, sans-serif" size="2" color="#333333" style="font-size: 13px;">
    Copy paragraph 1.
    <br /><img src="../images/1x1spacer.gif" width="1" height="15" alt="" />
    Copy paragraph 2, and so on throughout.
    <br /><img src="../images/1x1spacer.gif" width="1" height="15" alt="" />
    </font>

I’m sure there are more techniques and ways to make HTML emails work in all email clients, but I find that the above guidelines help me work more efficiently by decreasing the time spent on fixing Lotus Notes issues (especially when Notes development is a requirement), in fact most are so reliable that I have also started using the above rules in all emails. You never know, they might help when it comes to developing emails for Microsoft Outlook 2007, when Word is used for parsing HTML emails.

XRAY – bookmarklets can be so much fun

A blog entry by my friend Gareth prompted me to blog about this useful bookmarklet.

So you have the web developer toolbar, have solved all issues in Firefox, only to find IE doesn’t do the same.

What if you could click a bookmarked site, load a piece of javascript, then you simply click on any element on a page to display the element, id, class, hierarchy, positioning, border, margin and padding values in a pretty interface? Well sonny, with X-Ray (from http://westciv.com) you can!

X-Ray bookmarklet with h1 selected

The best bit is that it even works in IE, so you can troubleshoot any box model or double margin problems easily! It’s an excellent idea, and if I hadn’t already voted for jQuery, I would have voted for it in the innovation category of the .net magazine awards. Maybe you could vote in my stead!

Bubble 2.0??

Bubble 2.0?

My friend and colleague sent me a link to this PC Mag article

Oh dear! What I hope this does not mean is that I will keep working hard at developing my favascript, Flash, PHP ekcetera skills only to find that the job market is saturated with people fallen from grace in respective bust companies or that the purchasers and users of such online things are put off completely.

Personally I think that there will always be failures in any kind of business environment and t’internet is no different, however the current trend of jumping on the latest band wagon is dangerous and will add to “Bubble 2.0″. Creating the next social networking site, or the next video streaming site and investing everything into it is always going to be a big mistake – I just think that there would be less of an impact if the burst does happen if some people sat back and went “Actually they did it well enough and I won’t be able to compete.”

Of course there are the services that should be removed and destroyed – things like mySpace that is a total waste of time, space and effort. Bad code breeding bad designs, thousands of bands you’ve never heard of spamming you, hundreds of friends (I don’t think I have 1,00 friends anyway – nevermind that use myspace!), bored people bombarding you with pointless things (can be applied to facebook as well!) and owned by an evil (alledgedly) corporate giant.

Rant over.

New Phone

HTC SPV E650

So I finally decided to upgrade my old SPV for a newer model. After some hold ups in the Orange shop on Oxford Street, I decided on a HTC SPV E650. With a nice slide out QWERTY keyboard, the latest Windows mobile (I think), Mobile office, Windows Media Player and random other programs it should do everything I need.

It seems really good so far – although I think it’ll be susceptible to breakage when I keep opening and closing the keyboard in my pocket (fidgeting I think it’s called).

Add it to the free (except for the repair cost) laptop I got from work, I’ll feel on the cutting edge of technology (yetstill be a few years behind).

Next thing to do is try and get a bigger micro SanDisk memory card for my phone, try the programs on my new phone, and find a power supply for my “new” laptop. Answers on a postcard if you know where to find a power supply for a HP Compaq Nx9010!

Flash Firefox bug, or bad design?

Bleeding Flash has been a nightmare today.

Why can’t it ever be simple!! Today’s specific problem was that a trailer that worked fine standalone broke in either IE or Firefox, dependent on how I integrated it.

I’m sure it must be something withing the flash file (or possible withing some javascript, although I couldn’t see *anything* that could possibly affect it in my javascript).

The problem was that in firefox the flash movie would only play if you moved your mouse!!

“WHAT?!” I hear you yell!

After some investigation, I found that the embed method worked fine in Internet explorer, yet not in firefox, whereas the the flash satay method worked fine in firefox but not IE…

After a hell of a lot of experimenting I had to do just what I didn’t want to, and use conditional comments to determine which method to use. Bad idea, but the only way I could get round it… for now…

This is the code, line breaks marked >> (in case anyone knows an easier, tidier fix!):

<![if !IE]> <object type=”application/x-shockwave-flash” data=”swf/movie.swf” width=”320″ height=”240″> <param name=”movie” value=”swf/movie.swf” /> <param name=”wmode” value=”transparent” /> <param name=”allowScriptAcess” value=”sameDomain” /> <param name=”autostart” value=”true” /> <param name=”controller” value=”true” /> </object>
<![endif]>

<!–[if IE]>\r\n
<div id=”video”> <object
classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://fpdownload.macromedia.com/pub/ >>
shockwave/cabs/flash/swflash.cab#version=8,0,0,0″ width=”320″ height=”240″ id=”trailer”> <param name=movie value=”swf/movie.swf”> <param name=quality value=high> <param name=bgcolor value=#000000> <embed src=”swf/movie.swf” quality=high bgcolor=#000000width=”320″ height=”240″ name=”trailer” align=”" type=”application/x-shockwave-flash”
pluginspage=”http://www.macromedia.com/go/getflashplayer”> </embed>
</object> </div>
<!enfif]–>