Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Automatic email link

Posted on 1999-06-24
Medium Priority
Last Modified: 2010-04-09
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="">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?
Question by:toff
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 1851180
Try this:: this would definitely solve your problem::

<title>mail thru href</title>

<a href="">

<p>mailit</a> </p>

Expert Comment

ID: 1851181
the above solution worked with ie4+ outlook as email editor

Author Comment

ID: 1851182
Didn't work. I'm using Netscape 4 (browser and email). I tried the following:
<a href="">

on clicking it, i got an empty email message come up addressed to:

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


(two different addressees on the one email).
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

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

which wasn't quite the intent.

Author Comment

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

Accepted Solution

figueira earned 1560 total points
ID: 1851185
You can use the following javascript function to do the job:

 <title>Open mail window test</title>
<script language="JavaScript">
function openMailWindow(dest, subject, body) {
  var URL = "mailto:" + dest + "?Subject=" + subject;
  URL = URL + "&Body=" + body;
// -->
<a href="javascript:openMailWindow('',
    'A test subject',
    'The e-mail body\nwith more than\na single line');"
    >Open mail window</a>

That worked fine with NS 4.08 and IE 4.0.

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question