I am trying to send mail with Javascript from my website. Here is a general template:
So it looks like that, but I want it to send the information on the page to me automatically when they click submit; not popup like an Outlook or Netscape email program. This way it is clean and easier to use. Anyway, I'm not sure how to do it. So far the only thing I have found is like this:Code:<html> <head><title>My Comments Page</title></head> <body> Submit any comments you would like to me. <input type=text name="name"> <input type=text name="message"> <input type=button name="sendmail" value="Send It" onClick=""> </body> </html>
Problem is it pops up an external client, or does not work at all.Code:functionsendmail() { document.emailForm.action='mailto:' + '<myemailaddy>' + '?SUBJECT=' + 'Comment'; document.emailForm.value=name.value + ' ' + comment.value; }




Reply With Quote