SHARE
TWEET

Untitled

a guest Jul 21st, 2017 445 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var nodemailer = require('nodemailer');
  2.  
  3. var transportador = nodemailer.createTransport({
  4.       service: 'gmail',
  5.       auth: {
  6.         user: 'sbeckerassessoria@gmail.com',
  7.         pass: 'futebol11'
  8.         }
  9.     });
  10.  
  11. exports.send = function(){
  12.  
  13.     var configuracoes = {
  14.         from: 'Seu Nome <sbeckerassessoria@gmail.com>',
  15.         to: 'Nome do Destinatário <emaildodestinatario@gmail.com>, Outra Pessoa <stromdh@gmail.com>',
  16.         subject: 'Assunto do Email',
  17.         text: 'Conteúdo do email em texto',
  18.         html: '<h1>Conteúdo do email em HTML</h1>'
  19.     };
  20.  
  21.     transportador.sendMail(configuracoes, function(error, info) {
  22.         if (error) {
  23.             console.log(error);
  24.         } else {
  25.             console.log('Email enviado ' + info.response);
  26.         }
  27.     });
  28. }
  29.    
  30. transportador.sendMail(configuracoes, function(error, info) {
  31.     if (error) {
  32.         console.log(error);
  33.     } else {
  34.         console.log('Email enviado ' + info.response);
  35.     }
  36. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top