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
Solved

Sending Mail with mailto

Posted on 2000-05-15
19
349 Views
Last Modified: 2010-07-22
How do I open a blank email from a webpage which has NO Recipient Address and does have a Subject.

I've tried <a href="mailto:?subject=test"> to no avail.
0
Comment
Question by:greenrc
  • 5
  • 5
  • 3
  • +4
19 Comments
 

Author Comment

by:greenrc
ID: 2812708
Adjusted points from 50 to 200
0
 
LVL 2

Expert Comment

by:freshmeat
ID: 2812773
Mailto Protocol

--------------------------------------------------------------------------------
Opens a client's e-mail system.
Syntax

mailto:sAddress[;sMoreAddresses][&sSubject][&sBody][&sCC][&sBCC]
Possible Values

sAddress  Required. Specifies one or more valid e-mail addresses separated by a semicolon. You must use Internet-safe characters. Use %20 for the space character.  
sSubject  Optional. Specifies the text to appear in the subject line of the message.
sBody  Optional. Specifies the body of the message.  
sCC  Optional. Specifies the addresses to be included in the "cc" (carbon copy) section of the message.  
sBCC  Optional. Specifies the addresses to be included in the "bcc" (blind carbon copy) section of the message.  

Remarks

Available as of Microsoft® Internet Explorer 3.0 or later.


Example

The following example shows a link that will prepare an e-mail message.

<A HREF="mailto:mtscf@microsoft.com&subject=Feedback&body=The%20InetSDK%20Site%20Is%20Superlative">Click Here to send feedback to the InetSDK.</A>

The following example shows an HTML form being used to create an e-mail message.

<FORM ACTION="mailto:mtscf@microsoft.com" METHOD=GET>
<INPUT NAME=subject TYPE=hidden VALUE="InetSDK%20User%20Feedback">
Enter comments about this site:<BR>
<TEXTAREA NAME=body COLS=40>
InetSDK: http://msdn.microsoft.com/workshop/
The InetSDK site is superlative!
</TEXTAREA>
<INPUT TYPE=submit VALUE="Send Feedback">
</FORM>

0
 

Author Comment

by:greenrc
ID: 2812834
Does not separate values.

Puts the whole mailto "mtscf@microsoft.com&subject=Feedback&body=The%20InetSDK%20Site%20Is%20Superlative" into the recipient address.

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:freshmeat
ID: 2812869
mailto:sAddress[;sMoreAddresses][&sSubject][&sBody][&sCC][&sBCC]
Possible Values

sAddress  Required. Specifies one or more valid e-mail addresses separated by a semicolon. You must use Internet-safe characters. Use %20 for the space character
----------------
SO u can't make a mail without specified address, but can u try only a ";" in the field of address?
0
 

Author Comment

by:greenrc
ID: 2812882
If I use your example:


<A HREF="mailto:mtscf@microsoft.com&subject=Feedback&body=The%20InetSDK%20Site%20Is%20Superlative">Click Here to send feedback to the InetSDK.</A>

It places the whole mailto into the recipient address. It does not separate.

0
 
LVL 8

Expert Comment

by:jbirk
ID: 2812950
greenrc, did you see my comment on your previous duplicate of this question?  What you supplied at the top worked for me with NN 4.7 and IE 5.0 using Netscape Messenger as my default mail client.  What are you using exactly that it's not working on, and does supplying a recipient work at all for you?

Like this:
<a href="mailto:mtscf@microsoft.com?subject=test">

-Josh
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2812953
Incidentally the ? is needed between the recipietn address and the argument string which contains the subject,body,CC, etc...  Then between each of these things the & is used.

-Josh
0
 

Author Comment

by:greenrc
ID: 2813041
I tried

<a href="mailto:mtscf@microsoft.com?subject=test">

to no avail.

To: mtscf@microsoft.com?subject=test
From:
Cc:
Subject:

I am running IE4 and Outlook 98.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2813448
your own code just works fine for IE 5.5 though....

0
 
LVL 8

Expert Comment

by:jbirk
ID: 2814178
Hmmm.... maybe it's outlook.  I'll have to see if I can run a test on a computer with outlook...

-Josh
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2814245
I just tested it on a machine with outlook express 5, and IE 5.0.  It worked fine.  Is this running locally on your computer or over a server?  Also is it a Windows machine (I'm assuming)?
-Josh
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2814568
jbirk, as you should know this is more a problem of how the email client program uses the query passed to the mailto. Just mailto will open the standard mail-program........then it depends on that program how it will put something in where.

Outlook does it just fine, thankfully.
I haven't tried it with NS (yet).
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2815840
CJ_S, that's what I was testing.  Because it worked fine for me in Netscape messenger 4.7, I wanted to test outlook to see how it worked, if it was parsing this string ok.  And outlook express 5 handled it just fine for me.  Hence, the confusion on what's causing the problem...

I seem to remember having trouble getting mailto's to work on unix a few years ago (Netscape 3 would be my guess at that time), so it could be the OS, but I'm pretty much assuming windows since all the products mentioned are microsoft...  After that it's possibly a bug with that version of outlook?

-Josh
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2816160
I was pointing towards the question

Is this running locally on your computer or over a server?  

Anywayzzz, I agree with you for the rest what you said.
0
 
LVL 1

Accepted Solution

by:
sureshkumar earned 200 total points
ID: 2817387
<html>
<head>
<title>test</title>
</head>
<body>
<a href="mailto:  ?subject=test">mail</a>
</body>
</html>

further quries
suresh kumar
0
 
LVL 6

Expert Comment

by:boycy
ID: 2817620
for subject use ?subject=, for everything else use &, eg &cc=, &bcc= and &body=
This definitely works on windows running Outlook Express and IE5 and Im sure it works on NN as well
0
 

Expert Comment

by:Frosty_Mug
ID: 2822999
Ok, here we go, rather than just having <a href="mailto:?subject=test"> You need to have <a href="mailto:?subject=test></a> I believe that will work...
0
 

Author Comment

by:greenrc
ID: 2823748
Just won't work for me .
0
 

Expert Comment

by:Frosty_Mug
ID: 2823778
Just kind of a point of interest, the answer you accepted could be simplified by just using the tag

<a href="mailto:?subject=test"></a>

You did not need the
<html>
<head>
<title>test</title>
</head>
<body>
</body>
</html>

tags....
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Link a File Housed on a Shared Drive to a repository in SharePoint 2013 6 29
Create tabs to show divs 9 35
Index on a Table 6 25
Button on Table, name table1 not working 4 21
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

856 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