Link to home
Start Free TrialLog in
Avatar of toff
toff

asked on

Automatic email link

How do you get a link on your page which will automatically open an email with certain data already in the Subject and body?

I know the:

<a href="mailto:me@my.place.com">Send me an email</a>

tag works to open their email application, correctly addressed, but how can I specify something as the Subject and the Body?
Avatar of maniks
maniks

Try this:: this would definitely solve your problem::
<html>

<head>
<title>mail thru href</title>
</head>

<body>
<a href="mailto:me@my.place.com&subject=testsubject&body=testmessage">

<p>mailit</a> </p>
</body>
</html>
the above solution worked with ie4+ outlook as email editor
Avatar of toff

ASKER

Didn't work. I'm using Netscape 4 (browser and email). I tried the following:
<a href="mailto:toff@earthling.net&subject=testing&body=messagebody">

on clicking it, i got an empty email message come up addressed to:
toff@earthling.net&subject=testing&body=messagebody

If there's white space in the subject or body, it breaks the string there and gives two addresses, eg:
<a href="mailto:toff@earthling.net&subject=some testing&body=messagebody">

gave
toff@earthling.net&subject=some
testing&body=messagebody

(two different addressees on the one email).
Avatar of toff

ASKER

Didn't work. I'm using Netscape (browser and email). I did the above and got an email addressed to:

mailto:me@my.place.com&subject=testsubject&body=testmessage

which wasn't quite the intent.
Avatar of toff

ASKER

oops, sorry, the email i got was, of course, addressed to:

me@my.place.com&subject=testsubject&body=testmessage
ASKER CERTIFIED SOLUTION
Avatar of figueira
figueira

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial