nodemailer
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '[email protected]',
pass: 'yourpassword'
}
});
var mailOptions = {
from: '[email protected]',
to: '[email protected]',
subject: 'Sending Email using Node.js',
text: 'That was easy!'
};
transporter.sendMail(mailOptions, function(error, info){
if (error) {
console.log(error);
} else {
console.log('Email sent: ' + info.response);
}
});var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: '[email protected]',
pass: 'yourpassword'
}
});
const mailOptions = {
from: '[email protected]', // sender address
to: '[email protected]', // list of receivers
subject: 'Subject of your email', // Subject line
html: '<p>Your html here</p>'// plain text body
};
transporter.sendMail(mailOptions, function (err, info) {
if(err)
console.log(err)
else
console.log(info);
});
Also in JavaScript:
- adding cors parameters to extjs ajax
- how to solve Could not write JSON: Infinite recursion (StackOverflowError)
- javascript switch assignment
- javascript filter array of objects
- how to check if window size of browser s changed javascript
- Check ratelimit discord js
- template literal syntax' is only available in ES6 (use 'esversion: 6'). (W119)jshint(W119)
- on click move item top react
- nodejs json data serving
- javascript stringify line breaks
- react native button
- jquery select input value empty and hasclass
- return value from javascript function
- lazy react
- less than or equal js
- get a element using name in jquery
- how to run a vue js hello world app in vue version 3
- how to use the match function in javascript for regex
- hidden jquery
- passing data variable using ajax
- preventive vs reactive
- change the value in checkbox by button react
- firebase cheat sheet
- how to set time with jwt token in node js