It was working before, but I'm getting this error in development and production recently
There is an error with the email configuration you have provided. Error: Connection timeout
Failed to send mail to [email protected], subject: Reset Your Password
err: {
"type": "Error",
"message": "Connection timeout",
"stack":
Error: Connection timeout
at SMTPConnection._formatError (/home/webarto/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
at SMTPConnection._onError (/home/webarto/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)
at Timeout.<anonymous> (/home/webarto/node_modules/nodemailer/lib/smtp-connection/index.js:235:22)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
"code": "ETIMEDOUT",
"command": "CONN"
}
// server.ts
import nodemailer from "nodemailer";
// resend
const transport = nodemailer.createTransport({
host: "smtp.resend.com",
secure: true,
port: 465,
auth: {
user: "resend",
pass: "re_password",
},
});
...
await payload.init({
secret: process.env.PAYLOAD_SECRET,
express: app,
email: {
fromName: "Eustachio",
fromAddress: "[email protected]",
transport,
},
onInit: () => {
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`);
},
...
I have checked firewalls for port 465 and it is open, I don't if there is another port or ip that is trying to communicate with the server and it isn't open
Any help would be great, please. Thank you