N8n send mail troubles with o365

Hello !
Problem is sending e-mail with n8n send mail using o365 account with TLS.
What is the cuse of the problem and how to solve it.
My o365 account works and i can login through the web | Microsoft 365 (office.com)](https://www.office.com/
I’m using the host : smtp.office365.com
Port 587
SSL/TLS is active
Then i try to send mail i get following error:
0038CC20027F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:…/ssl/record/ssl3_record.c:354:
Error details are:
Error code
ESOCKET
Other info

Node type

n8n-nodes-base.emailSend

Node version

2.1 (Latest)

n8n version

1.42.1 (Self Hosted)

Time

6/7/2024, 8:46:58 AM

Stack trace

NodeApiError: 0038CC20027F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:…/ssl/record/ssl3_record.c:354: at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/EmailSend/v2/send.operation.ts:339:10) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts:76:16) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1378:8) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1057:29 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1744:11

  • n8n version: 1.42.1
  • Database (PostgreSQL):PostgreSQL
  • Running n8n via ( npm, n8n):npm, n8n
  • Operating system:Debian GNU/Linux 12 (bookworm)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @alolauri,

Can you disable the SSL/TLS option in the credential and see if that helps. If it is enabled I think it tries to use SSL instead of TLS so you need to disable it, The error you are seeing is saying that the n8n is expecting an SSL connection not a TLS one.

Hello with SSL/TLS disaled tehe error messiga is different:

Invalid login: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit Enable or disable SMTP AUTH in Exchange Online | Microsoft Learn for more information. [GVX0EPF0000ED7F.SWEP280.PROD.OUTLOOK.COM 2024-06-07T09:58:59.414Z 08DC850862EC8E0F]

Node type

n8n-nodes-base.emailSend

Node version

2.1 (Latest)

n8n version

1.42.1 (Self Hosted)

Time

6/7/2024, 12:58:59 PM

Stack trace

NodeApiError: Invalid login: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit Enable or disable SMTP AUTH in Exchange Online | Microsoft Learn for more information. [GVX0EPF0000ED7F.SWEP280.PROD.OUTLOOK.COM 2024-06-07T09:58:59.414Z 08DC850862EC8E0F] at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/EmailSend/v2/send.operation.ts:339:10) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts:76:16) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1378:8) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1057:29 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1744:11

That error is better, So Microsoft is saying you don’t have SMTP authentication enabled, You may be better off using the Outlook node instead to send emails as that will support oauth which will possibly work better for you.

Thanks - i try the outlook node

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.