Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var smtpConfig = {
- service: 'Gmail',
- auth: {
- user: 'juancesarandrianto@gmail.com',
- pass: 'mutiaragading'
- }
- };
- // create reusable transporter object using the default SMTP transport
- var transporter = nodemailer.createTransport(smtpConfig);
- // setup e-mail data with unicode symbols
- var mailOptions = {
- from:"juan <juancesarandrianto@newmanpearsons.com>", // sender address
- to: 'juancesarandrianto@gmail.com', // list of receivers
- subject: 'Hello ✔', // Subject line
- text: 'Hello world 🐴', // plaintext body
- html: '<b>Hello world 🐴</b>' // html body
- };
- // send mail with defined transport object
- transporter.sendMail(mailOptions, function(error, info){
- if(error){
- console.log(error);
- }
- console.log('Message sent: ' + info.response);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement