how to send mail node.js
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);
}
});
Also in JavaScript:
- jquery loop through list element
- find leap year javascript
- play sound javascript
- crypto node
- can we add jquery in chrome extension js code
- TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined at validateString (internal/validators.js:120:11)
- how to find dates in a string in js
- check for balanced parentheses in javascript
- event handler attachment jquery
- jquery animation
- hack sitw
- javascript string includes substring
- How to Use the JavaScript Fetch API to Get Data
- sort by string react
- javascript style inline react
- if string have any digits javascript
- laravel send http post request json
- javascript deap clone an object
- javascript get dictionary values
- vowels consonants javascript
- transition event listener does not work
- react background image
- Adding an event listener to an element that doesn't exist yet
- javascript capitalize string