Click to See Complete Forum and Search --> : to send mail in javascript should work for all mail clients.


raghu
03-27-2003, 01:20 PM
Here I Have a problem where in I need to open the Email client and display subject in subject and body string in body of the mail and client mail client can be Outlook express, netscape messenger or OUTLOOK.

so I need this to work in all these mail clients. The code below works well with Outlook mail client,I have to get this code working in outlook express and netscape messenger.

<html>
<head>
<script>
function jsSendLink()
{
var sDocurl = "http://localhost/docs/1/test.htm";
var sShowtoc ="y";
if (sDocurl != "")
{
if (sShowtoc == "y")
{
var sSubject = "SQL Book";
}
else
{
//TODO TITLE tag
//alert(window.parent.document.title);
}
}
//else
//{

//}
window.location = "mailto:test@test.com&subject = " + sSubject + "&body=" + sDocurl ;

}
jsSendLink()
</script>
</head>
</html>

Phil Karras
03-28-2003, 02:39 PM
Sorry, no can do. The problem is that they all handle things a bit differently, and on top of that the newer browsers don't even have it "turned on" most of the time.

Check out the article here:

Hints: Sending Form Results by Email
http://www.jsworkshop.com/bb/viewtopic.php?t=28