Welcome to WebmasterWorld Guest from 50.19.190.144

Forum Moderators: phranque

Message Too Old, No Replies

Is there another way

Automatic Subject and Body in Email

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

New User

10+ Year Member

joined:Feb 3, 2003
posts:30
votes: 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?

7:52 pm on July 8, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 19, 2003
posts:198
votes: 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.

8:23 pm on July 8, 2003 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2003
posts:30
votes: 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?

9:15 pm on July 8, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 19, 2003
posts:198
votes: 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.

11:47 pm on July 8, 2003 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2003
posts:30
votes: 0


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

and thanks for the help

2:14 pm on July 9, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 19, 2003
posts:198
votes: 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.

1:24 pm on July 16, 2003 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2003
posts:30
votes: 0


Thanks for the info
5:02 pm on July 24, 2003 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2003
posts:30
votes: 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.

5:22 pm on July 24, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 11, 2003
posts:146
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members