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

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
Is there another way
Automatic Subject and Body in Email
spherica




msg:382694
 7:17 pm on Jul 8, 2003 (gmt 0)

I have been getting a site together, and have tryed getting the Subject and Body to be automatic in a mailto <a href=" and this is the closest I've got.

<a href="mailto:whoever.com?subject=Link%20Request&body=Can%20I%20link%20to%20you">

This works in some email browsers, butnot in all it shows the %20 between the words,

Is there another way or is this about it?

 

broniusm




msg:382695
 7:52 pm on Jul 8, 2003 (gmt 0)

spherica-
I've been successful with just putting it in straight without escaping the string:
<a href="mailto:goodfolks@webmasterworld.com?subject=This is a great place to learn">email</a>

Try that and see how browser-generic it is for ya.

spherica




msg:382696
 8:23 pm on Jul 8, 2003 (gmt 0)

<a href="mailto:goodfolks@webmasterworld.com?subject=This is a great place to learn">email</a>

That will load the Subject, what about adding the Body?

broniusm




msg:382697
 9:15 pm on Jul 8, 2003 (gmt 0)

well, right, then add the body in the same way as you did but without the url-encoded chars:
"mailto:subject=Info Request&body=Looking for Info about my Big Toe"

Consider also that it's pretty darn easy to set up a PHP email contact form or ASP form if you have access to that. For instance, I use hotmail for everything, so clicking mailto links for me stinks for me. This will allow anyone and his dog to fill out the form, and you can even include "required fields" like phone number, etc.

spherica




msg:382698
 11:47 pm on Jul 8, 2003 (gmt 0)

can you give me an example of a php or asp email please

and thanks for the help

broniusm




msg:382699
 2:14 pm on Jul 9, 2003 (gmt 0)


Here's a free one for ASP:
[aspemail.com...]

And I believe this is "built in" with PHP:
[us4.php.net...]

Lots of examples out there in Google for each. Forms look much more professional online and are easier for users to use.

spherica




msg:382700
 1:24 pm on Jul 16, 2003 (gmt 0)

Thanks for the info

spherica




msg:382701
 5:02 pm on Jul 24, 2003 (gmt 0)

If I could back up a bit

with the & sign the page will not validate at w3c. Is there a solution beside going to a different setup or is that the only way?

Sorry, I did a search in the archives, but did not find a solution to my prob.

universalis




msg:382702
 5:22 pm on Jul 24, 2003 (gmt 0)

with the & sign the page will not validate at w3c

Try replacing & with &amp; - that should do the trick.

Having said that, I too would usually favor using a PHP or perl script and a web form rather than a mailto: link opening the user's email client. Their email client may not be configured correctly, or they may be on a public computer, or they may have a hotmail address, etc., whereas a web form will work fine in these cases. What's more, using a web form with a hidden recipient email address means that your address will be better protected from spam-bots scanning your pages for email addresses.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
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