Jump to content

Through JAVASCRIPT can we send MAIL??


rajmohan

Recommended Posts

AFAIK javascript doesnt have that sort of ability. Javascript runs on the client and can only do client side operations, so it cannot talk to the server to send an email from the local mail server that might be installed. If you want to send an email from your site you'll want to use a server side programming langauge in order to send an email, such as PHP and use the built in mail function - provided you have a local SMTP server installed and PHP is setup to use that SMTP server.

Or your friend might be getting his wires crosed with jsp, which is a server side version of javascript. Which I belive can send emails.
Link to comment
Share on other sites



<!-- Begin
function isPPC() {
if (navigator.appVersion.indexOf("PPC") != -1) return true;
else return false;
}
if(isPPC()) {
document.write('<b>Send <A CLASS="contact" HREF=\"mailto:\?subject\=Take a look at this page I found, ' + document.title + '?body=You can see this page at: ' + window.location + '\" onMouseOver="window.status=\'Send your friends e-mail about this page\'; return true" TITLE="Send your friends e-mail about this page">this page<\/A> to a friend</b>');
}
else { document.write('<b>Send <A CLASS="contact" HREF=\"mailto:\?body\=Take a look at this page I found, ' + document.title + '. You can see this page at: ' + window.location + '\" onMouseOver="window.status=\'Send your friends e-mail about this page\'; return true" TITLE="Send your friends e-mail about this page">this page<\/A> to a friend</b>');
}
//  End -->



then what is the use of this one whether this coding will send mail please tell me i dont know
Link to comment
Share on other sites

That is not sending the mail. What that does is opens up your email client, eg Outlook Express, Thunderbird or what ever your email client is. It is then down to you to send the email yourself by clicking the Send button in your email client. Plus its not javascript either. Its actually to do with the [b]mailto:[/b] protocol for your link. You're using javascript to populate the email subject and the body of the email.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.