homepage Welcome to WebmasterWorld Guest from 54.226.136.179
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
mailto: a syntax question
tedster

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



 
Msg#: 467 posted 10:29 am on Mar 24, 2001 (gmt 0)

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

WebmasterWorld Administrator brett_tabke us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 467 posted 12:09 pm on Mar 24, 2001 (gmt 0)

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

10+ Year Member



 
Msg#: 467 posted 12:46 pm on Mar 24, 2001 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 467 posted 6:36 am on Mar 25, 2001 (gmt 0)

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

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



 
Msg#: 467 posted 7:07 am on Mar 25, 2001 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 467 posted 7:18 am on Mar 25, 2001 (gmt 0)

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

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



 
Msg#: 467 posted 7:25 am on Mar 25, 2001 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved