how to create a java script mail function.......... I am using some script which are findout to google but no anyone script are working......... so plz help me......
Directly you don't have any mail function in js like php have. but you can create a form and in the form action you can provide mailto like following : [SIZE=+1]<form action="mailto:you@yourdmainhere.com" method="post" enctype="text/plain" > FirstName:<input type="text" name="FirstName"> Email:<input type="text" name="Email"> <input type="submit" name="submit" value="Submit"> </form>[/SIZE] sheetal
A mailto: link will open the user's email program (assuming they have a default email program set) with the data you included in the link - your email address, the information they entered on the form, any hard-coded text you include. If you want a form they just fill out and click, you have to use server-side code (PHP, ASP or Cold Fusion) to get the data from the user, then send the email. There are two possible problems here: 1) If you do it in Javascript, your email address is exposed on the site. Email address harvesters look for those emails. That address will become unusable due to spam very quickly. 2) If you do it on the server, your host must allow the mail function (some have it effectively disabled), and must provide an SMTP server, or you have to send the email through another SMTP server (like your Google email account).
you can not send emails with javascript, but you still can submit your data with jquery to php file which sends the email