Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

send mail with javascript

// use formspree or EmailJS or SmtpJS 

// for SmtpJS 
//  configure your Gmail : Revoke 2-step verification and Enabling less secure apps to access Gmail
// setup SMTP Server 
<script src="https://smtpjs.com/v3/smtp.js"></script>
 sendMail.addEventListener('click', (e) => {
 	e.preventDefault();
 	Email.send({
 		SecureToken: "token",
 		To: 'destination mail',
 		From: "sender mail",
 		Subject: "This is the subject",
 		Body: "body content"
 	}).then(
 		message => alert(message)
 	);
 })
Comment

PREVIOUS NEXT
Code Example
Javascript :: get value of hidden field jquery 
Javascript :: javascript quicksort 
Javascript :: btn.addeventlistener 
Javascript :: javascript pushstate 
Javascript :: javascript capitalize first letter of each word 
Javascript :: js get random element in array 
Javascript :: convert date to string format dd/mm/yyyy javascript 
Javascript :: react history go back 
Javascript :: jquery selector this and class 
Javascript :: jquery get name attribute 
Javascript :: node mssql 
Javascript :: Both npm and yarn have created lockfiles for this application, 
Javascript :: perform database transaction with sequelize 
Javascript :: btoa javascript 
Javascript :: put 0 in front of month number javascript 
Javascript :: how to access form values in react 
Javascript :: jquery move element to another without losing events 
Javascript :: react useeffect 
Javascript :: javascript remove object property 
Javascript :: js pow 
Javascript :: js map add property 
Javascript :: get value of input jqueyr 
Javascript :: part of sting js 
Javascript :: use onchange with react select 
Javascript :: loop array in javascript 
Javascript :: date js 
Javascript :: setimmediate vs settimeout 
Javascript :: how to add two attay into object in javascript 
Javascript :: fetch api javascript 
Javascript :: how can i validate a password without regex in js 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =