how to create a java script mail function.......... 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......
There's no function that allows javascript to send an email. However, you could use AJAX to request a page that does send an email in eg. PHP.
The mail need to be sent with the help of a server which javascript cannot do. It has to be combined with server side script.
Javascript is a client-side programming language. This means that when it is executes in the browser, it is the website visitor's browser that is executing this code. This is why you see some javascript code work for one browser and not for another, it depends on how each browser parses the code. Javascript doesn't provide a way to send out mail, because it is a client-side language. Even if you could write a way to send mail with javascript, it would likely only work for one client, unless all of your clients have exactly (exact mirrors) the same system setup, using the same ISP, using the same outgoing mailserver, using the same authentication credentials, etc. As others have said, you would need a server-side programming language to send out mail. Perhaps something with PHP. Perhaps using an AJAX request to connect a javascript to a PHP script on a server.
there's no Javascript mail function, what you can do is create a mail form then send it via ajax then the mail function is processed server-side (i.e. PHP)