On 2/13/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:
I think it's the spaces at the ends of your lines that mess up most other clients trying to put the URL back together again.
Yep, seems it's "delsp=yes" being used by Mail.app, but not being supported by other mail clients. http://www.macintouch.com/mail.app15.html Jun. 3, 2005 Long URLs David Duff Other posters correctly point out problems with sending url's in mail...when sending, Mail.app uses a "Content-Type: text/plain;" with the option "format=flowed", which seems to be fairly standard. It also uses the option "delsp=yes". the semantics of the delsp option are that if delsp=yes, then the space at the end of the line should be removed when the lines are joined together into paragraphs. When doing "normal" line wrapping between words, where the space should be present, Mail.app ends the line with two spaces. When wrapping a line with a URL, where the space should not be present, Mail.app uses a single space. Thus, it should be possible, in theory, to correctly reconstruct the URL. Unfortunately, this doesn't work. At least not when sending mail among the most popular two mail clients on the Mac platform (namely Mail.app and Microsoft entourage). the problem may be that the delsp option is a fairly new (added between RFC2646 and RFC3676) and not yet widely adopted. There is also widespread "internet wisdom" that suggests that url's can be protected by surrounding them with angle-brackets or with the strings "<URL:" and ">". I am not completely clear on whether this is supposed to prevent the sending program from breaking the URL or to assist the receiving program in reconstructing it. I have confirmed empirically however, that Mail.app WILL break url's that are enclosed in angle brackets. I have further confirmed that (at least) the entourage mail program is unable to correctly reconstruct a URL that has been split by Mail.app, with or without angle brackets. As of Mail.app version 2 (Tiger), mail can send messages with "Content-Type: text/html", which it (confusingly) refers to as "rich text" in the format menu. Using this type of encoding, it is fairly easy to embed url's reliably in a message. You simply select some text in the message, right-click on it and select "edit link..." and paste or type the URL. This will embed the link and sidestep any problems related to line breaks and flowed text. Parenthetically, I discovered a bug in this feature that users may want to be aware of: Mail.app is overly zealous in trying to encode nonstandard characters. To demonstrate the bug, in Safari, go to any URL that has a space in it. In the address bar, safari will display the URL (correctly) with the space encoded as "%20". if you copy the URL out of Safari and paste it as a link in an email message using "edit link...", you will see that mail replaces the % symbol with the string "%25" (you have to examine the raw source of the sent message to discover this). thus, the link will not work. It is fine that Mail.app is trying to catch "non-standard" characters and encode them for you, but the app should be smart enough to not try to replace percent characters that are already part of an extended encoding sequence (such as "%20" in this case). this bug has been reported to Apple (bug id 4126109).