homepage Welcome to WebmasterWorld Guest from 50.19.206.49
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

    
using mailto with subject & body pre-filled
How do I do this?
LABachlr




msg:590846
 7:44 pm on Aug 22, 2003 (gmt 0)

How do I code a mailto line so that both the subject and body will be pre-filled?

I already know how to get each one working individually:

mailto:me@mydomain.com?subject=my subject
mailto:me@mydomain.com?body=body of email

 

choster




msg:590847
 7:47 pm on Aug 22, 2003 (gmt 0)

It's not guaranteed to work, but what you're essentially sending the mail client are CGI variables. Thus you add paramenters with the ampersand (&):

mailto:me@mydomain.com?subject=my%20subject&body=body%20of%20email

LABachlr




msg:590848
 8:04 pm on Aug 22, 2003 (gmt 0)

Cool! Thanks!

Originally posted by choster

It's not guaranteed to work

Are you saying that it will only work some of the time, or only with certain browsers, or did you simply not test it before you posted it?

I tried it and it works for me.

bcolflesh




msg:590849
 8:07 pm on Aug 22, 2003 (gmt 0)

It depends what the user has their default Email application set to.

rcjordan




msg:590850
 8:19 pm on Aug 22, 2003 (gmt 0)

I had some trouble with the %20, particularly in a 10 or 15-word sentence. Try to keep it short and, if possible, hyphenated. It lost a lot on aesthetics, but I needed the functionality.

LABachlr




msg:590851
 8:25 pm on Aug 22, 2003 (gmt 0)

Originally posted by choster

It depends what the user has their default Email application set to.

Gottcha. Thanks.

So it pretty much should work for 99% of the average joe users.

originally posted by rcjordan

I had some trouble with the %20, particularly in a 10 or 15-word sentence. Try to keep it short and, if possible, hyphenated. It lost a lot on aesthetics, but I needed the functionality.

Really? My sentences in the body are comprised of 35 words. What problems did you have? What was your default email client?

LABachlr




msg:590852
 8:28 pm on Aug 22, 2003 (gmt 0)

Had no problem with the 35 word message in the body, by the way. My default email client is Outlook.

rcjordan




msg:590853
 9:11 pm on Aug 22, 2003 (gmt 0)

>My sentences in the body are comprised of 35 words. What problems did you have? What was your default email client?

Eudora, but I didn't have the problem. I was, however, receiving email with the pre-filled body content truncated --probably where their email client window made the first line wrap, but that's just a guess.

LABachlr




msg:590854
 9:18 pm on Aug 22, 2003 (gmt 0)

I was, however, receiving email with the pre-filled body content truncated --probably where their email client window made the first line wrap, but that's just a guess.

OK. Cool. As long as the content that they type in their reply comes through, I'm good. Thanks.

choster




msg:590855
 10:23 pm on Aug 22, 2003 (gmt 0)

FYI Outlook and Mozilla seem to accept the fields cc= and bcc= as well.

LABachlr




msg:590856
 10:35 pm on Aug 22, 2003 (gmt 0)

FYI Outlook and Mozilla seem to accept the fields cc= and bcc= as well.

Cool. How would I incorporate those into the coding?

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