Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nodemailer = require('nodemailer');
- var mailerOptions = {
- transport: "SMTP",
- host: 'smtp.parser.cc',
- port: 587,
- secure: false,
- requireTLS: true,
- ignoreTLS:false,
- requiresAuth: true,
- authMethod:'NTLM',
- auth: {
- user: 'mailer@parser.cc',
- pass: '1246792942'
- },
- tls: {rejectUnauthorized: false},
- debug:true
- };
- // create reusable transporter object using the default SMTP transport
- var transporter = nodemailer.createTransport(mailerOptions);
- // setup e-mail data with unicode symbols
- var mailOptions = {
- from: '"Fred Foo 👥" <foo@blurdybloop.com>', // sender address
- to: '813920477@qq.com, wuxueqian2010@icloud.com, wuxueqian2010@hotmail.com, chinash2010@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){
- return console.log(error);
- }
- console.log('Message sent: ' + info.response);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement