Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var transporter = nodemailer.createTransport(smtpTransport({
- service: 'gmail',
- host : 'smtp.gmail.com',
- auth: {
- user: 'sidharthramanan@gmail.com',
- pass: '*******'
- }
- }));
- var mailOptions = {
- from: 'sidharthramanan@gmail.com',
- to: example@hotmail.com,
- subject: 'Email via Nodemailer',
- text: 'You've received an email via Nodemailer!'
- };
- transporter.sendMail(mailOptions, function(error, info){
- if (error) {
- console.log(error);
- } else {
- response.send("email sent successfully");
- }
- });
Add Comment
Please, Sign In to add comment