baptisteArno / typebot.io

💬 Typebot is a powerful chatbot builder that you can self-host.

Home Page:https://typebot.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot send email without credentials

kuon opened this issue · comments

Hello,

our network has an SMTP server on a private network that relay messages from servers without credentials.

I tried to leave SMTP_USERNAME and SMTP_PASSWORD empty, but I get this error:

Error: Missing credentials for "PLAIN"
    at SMTPConnection._formatError (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
    at SMTPConnection.login (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:444:38)
    at /srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-transport/index.js:272:32
    at SMTPConnection.<anonymous> (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:213:17)
    at Object.onceWrapper (node:events:633:28)
    at SMTPConnection.emit (node:events:519:28)
    at SMTPConnection.emit (node:domain:488:12)
    at SMTPConnection._actionEHLO (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:1347:14)
    at SMTPConnection._processResponse (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:969:20)
    at SMTPConnection._onData (/srv/typebot/typebot.io/node_modules/.pnpm/nodemailer@6.9.8/node_modules/nodemailer/lib/smtp-connection/index.js:755:14) {
  code: 'EAUTH',
  command: 'API'
}

I am on 2.26 branch

After further investigation, it seems this issue occurs only when using port 587, with port 25 it works. So I can work around for now but we usually block port 25, even on our private network.

I also found a fix:

https://github.com/directus/directus/pull/5673/files

And reference:

nodemailer/nodemailer#1142