Wraptext Can Break Links in CFMAIL HTML Emails

I've been working with an automated messaging system as of late and have run into little snags along the way - mostly in trying to normalize output across multiple email clients (I'll post on that shortly). One of the more peculiar things that I've observed is that the wraptext property of CFMAIL can affect the rendering of HTML mail content. Specifically, whitespace is injected at the line breaks.

I might not have realized this was happening, or even been affected by it, except that I had left in a quick test case of a wraptext at 30 characters. When the HTML content is rendered, it isn't obvious as to what is happening. However, both Outlook and GMail were inserting a single white space at the line breaks. This is annoying when it affects text, perturbing on anchor text and devastating to functionality in links. In one case, the break occurred between the "c" and "o" in the ".com". Outlook's response was to not even try to launch it. If, however, the break occurs after the fully qualified domain name, Outlook will at least try, even if it doesn't go where you want it to. (It was the doing nothing that drove me nuts).

So, moral of the story is that if you are setting the TYPE to HTML, you'll want to omit the WRAPTEXT completely or set its value to "No".

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.001. Contact Blog Owner