18 October 2018

API Send Email Free - How to send an email from JavaScript - EmailJS.com

EmailJS.com
Email 2018
<script type="text/javascript" src="https://cdn.emailjs.com/sdk/2.2.4/email.min.js"></script> <script type="text/javascript"> (function () { var payload = { "lib_version": "2.2.4", "user_id": "user_4QF6Oop7u5jgyVKPXwTDE", "service_id": "id_2w8kno", "template_id": "template_gWxLT36L", "template_params": { "ejs_dashboard__test_template": true, "to_name": "enter to name", "from_name": "enter from name", "reply_to": "your@email.com", "message_html": "contents", } } var url = "https://api.emailjs.com/api/v1.0/email/send"; $.ajax({ type: "POST", url: url, data: JSON.stringify(payload), contentType: "application/json; charset=utf-8", dataType: "json", success: function () { console.log("success!"); }, error: function () { console.log("errors"); } }); })();
</script>

0 nhận xét:

Post a Comment

 

BACK TO TOP

Xuống cuối trang