X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fsmtp-client-pool%2Fsrc%2Fmain.ts;h=4d1f2ea896188b7cfa49aa559dfaaab5f5a28f7c;hb=8b7aa4204c27efd1dc699f7baea65b5262bd26b3;hp=620bdb94e3ba65b193d1b3dfb125ed1d62320820;hpb=ea4b5fd037c5fe09eb6a2810332ad6bed1b5bc7f;p=poolifier.git diff --git a/examples/typescript/smtp-client-pool/src/main.ts b/examples/typescript/smtp-client-pool/src/main.ts index 620bdb94..4d1f2ea8 100644 --- 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', - pass: 'REPLACE-WITH-YOUR-GENERATED-PASSWORD' - } + pass: 'REPLACE-WITH-YOUR-GENERATED-PASSWORD', + }, }, mail: { from: '"Foo" ', to, subject: 'Hello', text: 'Hello world?', - html: 'Hello world?' - } + html: 'Hello world?', + }, }) ) } @@ -32,9 +32,9 @@ try { 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)