From ad22af07dc1723bd39b6bc6575f57a1759a7cf96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= <2pi_r2@gmx.de> Date: Sun, 24 Apr 2022 17:35:55 +0200 Subject: [PATCH] Update smtp.ts --- smtp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smtp.ts b/smtp.ts index 4327835..2234428 100644 --- a/smtp.ts +++ b/smtp.ts @@ -261,7 +261,7 @@ export class SmtpClient { // calc msg boundary // TODO: replace this with a match or so. config.mimeContent.map((v) => v.content).join("\n").replace( - new RegExp("--attachment(\d+)", "g"), + new RegExp("--attachment([0-9]+)", "g"), (_, numb) => { boundaryAdditionAtt += parseInt(numb, 10); @@ -279,7 +279,7 @@ export class SmtpClient { const arr = new Uint8Array(v.encoding === 'base64' ? base64Decode(v.content) : v.content); return dec.decode(arr); - }).join("\n").replace(new RegExp("--attachment(\d+)", "g"), (_, numb) => { + }).join("\n").replace(new RegExp("--attachment([0-9]+)", "g"), (_, numb) => { boundaryAdditionAtt += parseInt(numb, 10); return ""; @@ -291,7 +291,7 @@ export class SmtpClient { // calc msg boundary // TODO: replace this with a match or so. config.mimeContent.map((v) => v.content).join("\n").replace( - new RegExp("--message(\d+)", "g"), + new RegExp("--message([0-9]+)", "g"), (_, numb) => { boundaryAddition += parseInt(numb, 10);