/    Sign up×
Community /Pin to ProfileBookmark

to send mail in javascript should work for all mail clients.

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.

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

<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:[email protected]&subject = ” + sSubject + “&body=” + sDocurl ;

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

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Phil_KarrasMar 28.2003 — 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:

[color=blue][b]Hints: Sending Form Results by Email[/b][/color]

http://www.jsworkshop.com/bb/viewtopic.php?t=28
×

Success!

Help @raghu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...