Decrease Nodemailer limits

This commit is contained in:
Konstantin Wohlwend 2026-02-11 18:55:58 -08:00
parent e621510c62
commit ee9912fafb
2 changed files with 13 additions and 6 deletions

View File

@ -82,7 +82,6 @@ async function verifyEmailDeliverability(
}
const json = await emailableResponse.json() as Record<string, unknown>;
console.log("emailableResponse", json);
if (json.state === "undeliverable" || json.disposable) {
console.log("email not deliverable", email, json);

View File

@ -74,17 +74,25 @@ async function _lowLevelSendEmailWithoutRetries(options: LowLevelSendEmailOption
host: options.emailConfig.host,
port: options.emailConfig.port,
secure: options.emailConfig.secure,
connectionTimeout: 15000,
greetingTimeout: 10000,
socketTimeout: 20000,
dnsTimeout: 7000,
auth: {
user: options.emailConfig.username,
pass: options.emailConfig.password,
},
});
await transporter.sendMail({
from: `"${options.emailConfig.senderName}" <${options.emailConfig.senderEmail}>`,
...options,
to: toArray,
});
try {
await transporter.sendMail({
from: `"${options.emailConfig.senderName}" <${options.emailConfig.senderEmail}>`,
...options,
to: toArray,
});
} finally {
transporter.close();
}
return Result.ok(undefined);
} catch (error) {