mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Decrease Nodemailer limits
This commit is contained in:
parent
e621510c62
commit
ee9912fafb
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user