repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[poolifier.git]
/
examples
/
typescript
/
smtp-client-pool
/
src
/
main.ts
diff --git
a/examples/typescript/smtp-client-pool/src/main.ts
b/examples/typescript/smtp-client-pool/src/main.ts
index 620bdb94e3ba65b193d1b3dfb125ed1d62320820..4d1f2ea896188b7cfa49aa559dfaaab5f5a28f7c 100644
(file)
--- a/
examples/typescript/smtp-client-pool/src/main.ts
+++ b/
examples/typescript/smtp-client-pool/src/main.ts
@@
-14,16
+14,16
@@
for (const to of tos) {
secure: true,
auth: {
user: 'REPLACE-WITH-YOUR-ALIAS@DOMAIN.TLD',
secure: true,
auth: {
user: 'REPLACE-WITH-YOUR-ALIAS@DOMAIN.TLD',
- pass: 'REPLACE-WITH-YOUR-GENERATED-PASSWORD'
- }
+ pass: 'REPLACE-WITH-YOUR-GENERATED-PASSWORD'
,
+ }
,
},
mail: {
from: '"Foo" <foo@domain.tld>',
to,
subject: 'Hello',
text: 'Hello world?',
},
mail: {
from: '"Foo" <foo@domain.tld>',
to,
subject: 'Hello',
text: 'Hello world?',
- html: '<b>Hello world?</b>'
- }
+ html: '<b>Hello world?</b>'
,
+ }
,
})
)
}
})
)
}
@@
-32,9
+32,9
@@
try {
await Promise.all(smtpClientPoolPromises)
const elapsedTime = performance.now() - now
console.info(
await Promise.all(smtpClientPoolPromises)
const elapsedTime = performance.now() - now
console.info(
- `Send in parallel in ${elapsedTime.toFixed(
2)}ms ${
- tos.length
- } mails with SMTP client pool`
+ `Send in parallel in ${elapsedTime.toFixed(
+ 2
+
)}ms ${tos.length.toString()
} mails with SMTP client pool`
)
} catch (error) {
console.error(error)
)
} catch (error) {
console.error(error)