Advertisement
Guest User

Untitled

a guest
Aug 7th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var smtpConfig = {
  2. service: 'Gmail',
  3. auth: {
  4. user: 'juancesarandrianto@gmail.com',
  5. pass: 'mutiaragading'
  6. }
  7. };
  8.  
  9. // create reusable transporter object using the default SMTP transport
  10. var transporter = nodemailer.createTransport(smtpConfig);
  11. // setup e-mail data with unicode symbols
  12. var mailOptions = {
  13. from:"juan <juancesarandrianto@newmanpearsons.com>", // sender address
  14. to: 'juancesarandrianto@gmail.com', // list of receivers
  15. subject: 'Hello ✔', // Subject line
  16. text: 'Hello world 🐴', // plaintext body
  17. html: '<b>Hello world 🐴</b>' // html body
  18. };
  19. // send mail with defined transport object
  20. transporter.sendMail(mailOptions, function(error, info){
  21. if(error){
  22. console.log(error);
  23. }
  24. console.log('Message sent: ' + info.response);
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement