Unable to sent mail using nodemailer
up vote
-1
down vote
favorite
I am using node.js version 8.9.1 and nodemailer version 4.6.8. Below is my
code. I am using fake SMTP. SMTP details and port no received from my
network team.when i run the code i am getting the following error.Can anyone help me to come out from this.
Error is : `{ Error: connect EACCES 10.219.3.18:25
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNECTION',
errno: 'EACCES',
syscall: 'connect',
address: '10.219.3.18',
port: 25,
command: 'CONN' }`
Below is my code.
'use strict';
const nodemailer = require('nodemailer');
nodemailer.createTestAccount((err, account) => {
// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host : "10.219.3.18", //received from n/w team & enabled access for my ip
port: 25,//received from n/w team & enabled access for my ip
secure: false, // true for 465, false for other ports
auth: {
user : "someemailid@domain.com",
pass : "somepassword"
}
});
// setup email data with unicode symbols
let mailOptions = {
from : "someemailid@domain.com",
to : "someemailid@domain.com,someemailid2@domain.com",
subject: 'Hello ✔', // Subject line
text: 'Hello world?', // plain text body
html: '<b>Hello world?</b>' // html body
};
// verify connection configuration
transporter.verify(function(error, success) {
if (error) {
console.log(error);
} else {
console.log('Server is ready to take our messages');
}
});
// send mail with defined transport object
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Message sent: %s', info.messageId);
});
});
node.js nodemailer
add a comment |
up vote
-1
down vote
favorite
I am using node.js version 8.9.1 and nodemailer version 4.6.8. Below is my
code. I am using fake SMTP. SMTP details and port no received from my
network team.when i run the code i am getting the following error.Can anyone help me to come out from this.
Error is : `{ Error: connect EACCES 10.219.3.18:25
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNECTION',
errno: 'EACCES',
syscall: 'connect',
address: '10.219.3.18',
port: 25,
command: 'CONN' }`
Below is my code.
'use strict';
const nodemailer = require('nodemailer');
nodemailer.createTestAccount((err, account) => {
// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host : "10.219.3.18", //received from n/w team & enabled access for my ip
port: 25,//received from n/w team & enabled access for my ip
secure: false, // true for 465, false for other ports
auth: {
user : "someemailid@domain.com",
pass : "somepassword"
}
});
// setup email data with unicode symbols
let mailOptions = {
from : "someemailid@domain.com",
to : "someemailid@domain.com,someemailid2@domain.com",
subject: 'Hello ✔', // Subject line
text: 'Hello world?', // plain text body
html: '<b>Hello world?</b>' // html body
};
// verify connection configuration
transporter.verify(function(error, success) {
if (error) {
console.log(error);
} else {
console.log('Server is ready to take our messages');
}
});
// send mail with defined transport object
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Message sent: %s', info.messageId);
});
});
node.js nodemailer
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something liketelnet
ornmap
first.
– tadman
Nov 8 at 4:45
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I am using node.js version 8.9.1 and nodemailer version 4.6.8. Below is my
code. I am using fake SMTP. SMTP details and port no received from my
network team.when i run the code i am getting the following error.Can anyone help me to come out from this.
Error is : `{ Error: connect EACCES 10.219.3.18:25
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNECTION',
errno: 'EACCES',
syscall: 'connect',
address: '10.219.3.18',
port: 25,
command: 'CONN' }`
Below is my code.
'use strict';
const nodemailer = require('nodemailer');
nodemailer.createTestAccount((err, account) => {
// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host : "10.219.3.18", //received from n/w team & enabled access for my ip
port: 25,//received from n/w team & enabled access for my ip
secure: false, // true for 465, false for other ports
auth: {
user : "someemailid@domain.com",
pass : "somepassword"
}
});
// setup email data with unicode symbols
let mailOptions = {
from : "someemailid@domain.com",
to : "someemailid@domain.com,someemailid2@domain.com",
subject: 'Hello ✔', // Subject line
text: 'Hello world?', // plain text body
html: '<b>Hello world?</b>' // html body
};
// verify connection configuration
transporter.verify(function(error, success) {
if (error) {
console.log(error);
} else {
console.log('Server is ready to take our messages');
}
});
// send mail with defined transport object
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Message sent: %s', info.messageId);
});
});
node.js nodemailer
I am using node.js version 8.9.1 and nodemailer version 4.6.8. Below is my
code. I am using fake SMTP. SMTP details and port no received from my
network team.when i run the code i am getting the following error.Can anyone help me to come out from this.
Error is : `{ Error: connect EACCES 10.219.3.18:25
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNECTION',
errno: 'EACCES',
syscall: 'connect',
address: '10.219.3.18',
port: 25,
command: 'CONN' }`
Below is my code.
'use strict';
const nodemailer = require('nodemailer');
nodemailer.createTestAccount((err, account) => {
// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host : "10.219.3.18", //received from n/w team & enabled access for my ip
port: 25,//received from n/w team & enabled access for my ip
secure: false, // true for 465, false for other ports
auth: {
user : "someemailid@domain.com",
pass : "somepassword"
}
});
// setup email data with unicode symbols
let mailOptions = {
from : "someemailid@domain.com",
to : "someemailid@domain.com,someemailid2@domain.com",
subject: 'Hello ✔', // Subject line
text: 'Hello world?', // plain text body
html: '<b>Hello world?</b>' // html body
};
// verify connection configuration
transporter.verify(function(error, success) {
if (error) {
console.log(error);
} else {
console.log('Server is ready to take our messages');
}
});
// send mail with defined transport object
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Message sent: %s', info.messageId);
});
});
node.js nodemailer
node.js nodemailer
asked Nov 8 at 4:43
pradeep
558
558
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something liketelnet
ornmap
first.
– tadman
Nov 8 at 4:45
add a comment |
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something liketelnet
ornmap
first.
– tadman
Nov 8 at 4:45
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something like
telnet
or nmap
first.– tadman
Nov 8 at 4:45
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something like
telnet
or nmap
first.– tadman
Nov 8 at 4:45
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53201669%2funable-to-sent-mail-using-nodemailer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Seems like port 25 is either firewalled or not accepting connections at that particular IP. Test with something like
telnet
ornmap
first.– tadman
Nov 8 at 4:45