-5

how to send email using javascript/HTML5 . I created a from inside html with the parameters (Email To, Email Subject, Email Body) and i want to know how to send an email Thanks

afoash
  • 1
  • 1
  • 2
  • What email address would you expect it to be sent _from_? – nnnnnn Jul 28 '13 at 07:17
  • 4
    duplicate - http://stackoverflow.com/questions/7381150/send-email-with-javascript –  Jul 28 '13 at 07:18
  • 1
    You can't do that client side. You can only send an e-mail using server script. – sdespont Jul 28 '13 at 07:19
  • are you trying to send mail without opening the local mail client? say Outlook? Already a couple of links posted, but I think this might be useful too. http://stackoverflow.com/questions/14268796/how-do-i-send-email-with-javascript-without-opening-the-mail-client – Harry Jul 28 '13 at 07:20
  • this link can be helpful http://stackoverflow.com/questions/271171/sending-emails-with-javascript – Sirwan Afifi Jul 28 '13 at 07:20
  • yes i dont want to open outlook to send an email – afoash Jul 28 '13 at 08:05
  • There seems to be a new solution at the horizon. It's called [EmailJS](http://www.emailjs.com). They claim that no server code is needed. You can request an invitation. – Christiaan Westerbeek May 18 '15 at 16:19

2 Answers2

4

You cannot do it with pure html/javascript.
If you don't use ant 3-rd party service for email sending, where you can sent your data and it will do rest (i.e. Mailgun), then you'll need support from server side to accomplish this (php, asp.net, etc.)

Dima
  • 6,721
  • 4
  • 24
  • 43
0

refer this link http://www.javatpoint.com/java-mail-api-tutorial this will show how to do send emails using smtp .but we cannot send mails by using only javascript and html