Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nodemailer = require('nodemailer');
- var transporter = nodemailer.createTransport({
- service: 'gmail',
- port:'465',
- secure: 'false',
- auth: {
- user: 'my_id',
- pass: 'my_password'
- },
- tls: {
- rejectUnauthorized: false
- }
- });
- var mailOptions = {
- from: 'myemail',
- to: receiver's email,
- subject: "some text",
- text: "some text"
- };
- transporter.sendMail(mailOptions, function(error, info){
- if (error) {
- console.log(error);
- } else {
- console.log('Email sent: ' + info.response);
- }
- });
- { Error: connect ECONNREFUSED 74.125.124.109:465
- at Object.exports._errnoException (util.js:1026:11)
- at exports._exceptionWithHostPort (util.js:1049:20)
- at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
- code: 'ECONNECTION',
- errno: 'ECONNREFUSED',
- syscall: 'connect',
- address: '74.125.124.109',
- port: 465,
- command: 'CONN' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement