Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider processing email request asynchronously #8

Open
rcjsuen opened this issue Jul 15, 2024 · 0 comments
Open

Consider processing email request asynchronously #8

rcjsuen opened this issue Jul 15, 2024 · 0 comments

Comments

@rcjsuen
Copy link

rcjsuen commented Jul 15, 2024

By having the await inside the for loop, each iteration will wait before moving forwards. Could this be rewritten so that all the calls are executed asynchronously instead?

maildove/src/maildove.ts

Lines 352 to 361 in c5a8dbb

for (const domain in groups) {
try {
logger.info(`DOMN: Group: ${groups[domain]}`)
successOutboundRecipients.push(
await this.sendToSMTP(domain, parsedEmail.domain,
parsedEmail.address, groups[domain], message.toString()));
} catch (ex) {
logger.error(`Could not send email to ${domain}: ${ex}`);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant