Welcome to WebmasterWorld Guest from 54.147.44.93

Forum Moderators: incrediBILL

Message Too Old, No Replies

mailto: a syntax question

     

tedster

10:29 am on Mar 24, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I've just become aware that adding subject and/or body information to a "mailto:" URL may be problematic. I have one site that uses this a lot -- URLs like:
<a href="mailto:me@mydomain.com?subject="Seminar Information">contact us</a>

They do this because they are guaranteed an accurate email address, which is not true with a CGI form. But now I understand that some mail clients may misfire on this code.

Does anyone have the scoop on the risks and tradeoffs here?

Brett_Tabke

12:09 pm on Mar 24, 2001 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



From what I have seen, IE/NN 4-5-6 and Opera 5 work across the board on all platforms. Opera 3 doesn't.

gmiller

12:46 pm on Mar 24, 2001 (gmt 0)

10+ Year Member



As I recall, this was a Netscape extension, so some browsers may interpret the subject as part of the email address, causing all sorts of entertaining behavior. It's pretty widely supported these days, though.

Xoc

6:36 am on Mar 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tedster-

Nothing is going to accept:

<a href="mailto:me@mydomain.com?subject="Seminar Information">contact us</a>

There is one too many double quote marks in there. You will also need to encode the space as well as the quote marks.

tedster

7:07 am on Mar 25, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You're right -- I typed too fast. The quote before the word Seminar shouldn't be there.

However, the space hasn't been giving us any problems that I know of. What should I be doing?

Xoc

7:18 am on Mar 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using a %20 for the space is required. For the full spec of the mailto url, see [ietf.org...]

This is the RFC (request for comment) that details the spec for it.

Since it is a RFC, it is not a Netscape thing, but an Internet standard. Tools that understand URLs are supposed to understand this syntax.

Edited by: Xoc

tedster

7:25 am on Mar 25, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Thanks for the resource, and thanks for the input. I really appreciate it.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month