For testing RC as our future Chat System i installed the Version 7.7.1 - starter
on my local machine with deployment method “docker”.
Server Setup Information
Version of Rocket.Chat Server: 7.7.1 - starter
Operating System: Ubuntu
Deployment Method: docker
Number of Running Instances: 1
DB Replicaset Oplog:
NodeJS Version:
MongoDB Version:
Any additional Information
After setting up the SMTP values in the Admin Page. (see screenshot)
I cannot get any email message, neither from admin page nor from any other event.
I tested the SMTP connection from inside the docker network by setting up a node-service and ran this js code, this works fine:
const nodemailer = require("nodemailer");
// Create a test account or replace with real credentials.
const transporter = nodemailer.createTransport({
host: "smtp.ionos.de",
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: "chatservice@schade-consulting.de",
pass: "xxxxx",
},
});
// Wrap in an async IIFE so we can use await.
(async () => {
const info = await transporter.sendMail({
from: "chatservice@schade-consulting.de",
to: "schade.klaus@t-online.de",
subject: "Hello Klaus",
text: "Hello world and Klaus", // plain‑text body
html: "<b>Hello world an Klaus</b>", // HTML body
});
console.log("Message sent:", info.messageId);
})();
Error: Mail command failed: 530 Authentication required
at SMTPConnection._formatError (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
at SMTPConnection._actionMAIL (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:1594:34)
at SMTPConnection.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:1063:18)
at SMTPConnection._processResponse (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:969:20)
at SMTPConnection._onData (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:755:14)
at Socket.SMTPConnection._onSocketData (/app/bundle/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:193:44)
at Socket.emit (node:events:518:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Socket.Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'EENVELOPE',
response: '530 Authentication required',
responseCode: 530,
command: 'MAIL FROM'
}
And this is the logged error with smtps
[Error: 48428357617F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
] {
library: 'SSL routines',
reason: 'wrong version number',
code: 'ESOCKET',
command: 'CONN'
}
There were no logs according to the missing admin-settings page, but after a server restart it was visible.
After solving the issue 1) i could change the protokoll to “smtps” and port “465”. Then I got the emails, fine.
My email provider seems to accept smtp and smtps and for ever good reason from within RC only smtps seems to work.