Skip to content

SSL on node 0.8.4 and emailjs 0.3.1 giving me a ECONNREFUSED #42

Closed
NodePing opened this Issue Jul 31, 2012 · 13 comments

5 participants

@NodePing

Fresh install of 0.8.4 and emailjs 0.3.1 gives me a ECONNREFUSED when I enable SSL for sending mail on port 465.
No problems sending when switched over to ssl:false and on a non-ssl port.
The same code (ssl:true, port:465) works fine on older versions of node and emailjs.
Any ideas what I'm doing wrong?

Thanks,
Shawn

@eleith
Owner
eleith commented Aug 3, 2012

can you try 0.8.5? i was able to get it to work for me.

@snsparrish

Just tried 0.8.6 and the same issue with ECONNREFUSED

@eleith
Owner
eleith commented Aug 19, 2012

do you pass in {ssl:true} or {ssl:true, port:465}?

what is the exact error that is returned, and when does it return (upon connecting to the server or sending your first email to the server) ?

@maheshnreddy

Even I'm getting same error when {ssl: false} and I could successfully send mail through mail server via command line (telnet server-name 25).

Please let me, if any one solved this issue.

Thanks
Mahesh

@eleith
Owner
eleith commented Dec 17, 2012

i've been testing emailjs lately on many different email servers and still haven't run into this one (works with gmail, outlook, zimbra).

does this error happen when running on linux, mac or windows? what email server are you connecting to?

i'ld like to fix it, but will need to replicate it on my end or get more details on this one...

@maheshnreddy

Its with outlook SMTP server on Windows 7.

@eleith
Owner
eleith commented Dec 17, 2012

is this with smtp.live.com or a private smtp server?

@maheshnreddy

sorry, forgot to mention those details in previous message. Its private (corporate) mail server.

@eleith
Owner
eleith commented Dec 17, 2012

if you uncomment the following line, you'll get output from every exchange with the SMTP server.

https://github.com/eleith/emailjs/blob/master/smtp/client.js#L9

this output might help greatly in narrowing down the root cause.

@maheshnreddy

Much appreciated for your support and effort to resolve the problem.

@eleith
Owner
eleith commented Apr 7, 2014

can not reproduce

@eleith eleith closed this Apr 7, 2014
@Spin1987

Hi, i'm using emailjs on a windows maschine and i get folling error:
uh oh { [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
{ [Error: connection encountered an error]
code: 5,
previous:
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' },
smtp: undefined }
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }

My settings are:
"mail": {
"user": "mail@googlemail.com",
"password": "password",
"host": "smtp.gmail.com"
}

server.send({
text: "test email",
from: "mail@googlemail.com",
to: "mail@googlemail.com",
//cc: "else else@your-email.com",
subject: "testing emailjs"
}, function (err, message) {
console.log(err || message);
});

No matter which settings i have. With ssl or not, with an different port or with the default port. Do you think it is an issue on node js side? Do i need some more settings or an running mail server?

@eleith
Owner
eleith commented Jul 29, 2014

have you tried to turn on debug mode in smpt.js? that would output some more detail console that can give clues as to where this might be going wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.