I am getting this "ERROR: connect ECONNREFUSED ::1:465"

I don’t know why but getting this error:(
Actually I am trying send automated mail so doing this I followed
1st : use npx n8n
2nd : then I came to workflow here, I chose “send email” and then fill the “from” email account and “to” email and message.
3rd: the press the execution button
But getting this error:(

Please help me out…

Hi @Suchitra_Giri, I qickly tested this on my end but didn’t run into the trouble you have described here when running n8n via npx n8n:

image

The error message ECONNREFUSED ::1:465 could suggest you don’t have a valid server/host name entered in your SMTP credentials:

As a result n8n would be trying to reach port 465 on your current machine which is most likely not accepting connections (which would lead to the error you have described). Could you double-check with your email provider which hostname your SMTP server has?

Thanks for reply @MutedJam ,
Could you specify more actually I am following the docs but bit confuse, couldn’t get more in this part “Create an email account on a service with SMTP support”

I am new to this please help!

I left this field blank!

You would get this data from your email provider, typically in their documentation. Here are two examples from large email providers:

https://support.gmx.com/pop-imap/imap/server.html

https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040

The host field in the n8n credentials is often referred to as “Server”, “SMTP Server”, or similar in the documentation of email providers.

1 Like

Hey,
For SMTP credential…

I created the SMTP credentials from Elastic-Email
Then put my all details from there to my send email node “SMTP credential” section
Like username, password, hostname, post = 2525

But still getting this error:
ERROR: 68520000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:355:

Hi @MutedJam,
Kindly see this where I did mistake over here.
My host : smtp.elasticemail.com

In the credentials have you enabled “SSL/TLS”?

Yes! I did that

I am out of ideas, That error is normally around the transport side of things. Are you using a proxy at all?

No, not at all…
Just whatever I have mentioned, I did

@jon is it a problem with my node version?
cuz i don’t have any idea about it… but still guessing

Could be, but n8n needs a slightly older version. I will see if that mail provider offers a trial and give it a go tomorrow if no one else gets to it first.

Hi @Suchitra_Giri, the error message suggests n8n and the server couldn’t agree on SSL encryption.

Could you try setting up your email credentials like so:

So your username + password as shown by Elastic Email:

Host = smtp.elasticemail.com
Port = 2525
SSL/TLS = Disabled

This appears to have worked fine for me and the message arrived in my inbox a few minutes later:
image

1 Like


@MutedJam Thanks for your help, I am doing all the things but still getting error, and I am sure that I used correct credentials!

Details of the error:

Error: Invalid login: 535 535 Authentication failed: Access denied.
    at SMTPConnection._formatError (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:784:19)
    at SMTPConnection._actionAUTHComplete (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:1536:34)
    at SMTPConnection.<anonymous> (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:540:26)
    at SMTPConnection._processResponse (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:947:20)
    at SMTPConnection._onData (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:749:14)
    at TLSSocket.SMTPConnection._onSocketData (C:\Users\HP\AppData\Roaming\npm\node_modules\n8n\node_modules\nodemailer\lib\smtp-connection\index.js:189:44)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:234:10)

I can access the file on my system, but it’s very lager file could not understand much to rectify the error:(
Hope it makes sense to you… where I am lacking??

Now, getting this
ERROR: Mail command failed: 553 Envelope FROM ‘’ email address not allowed.

I suspect that error means you are not using a valid from address, they may have restrictions on some options to prevent spam / fraud.

1 Like

+1 what Jon said - these errors are coming from the email provider, so you might want to reach out them and check if they allow gmail sender addresses and if so, what the exact problem with your request would be.