diff options
author | Puyodead1 <puyodead@protonmail.com> | 2023-02-24 07:45:29 -0500 |
---|---|---|
committer | Puyodead1 <puyodead@protonmail.com> | 2023-02-24 07:45:29 -0500 |
commit | a22cdaaac62b888997fae37a285c68e056c01e16 (patch) | |
tree | c22b502b5e6f79d152af4551ddb6b8a4abe0a24b /src/util | |
parent | Merge pull request #984 from fosscord/dependabot/npm_and_yarn/http-cache-sema... (diff) | |
download | server-a22cdaaac62b888997fae37a285c68e056c01e16.tar.xz |
fix a few issues with emails
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util/email/index.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/util/util/email/index.ts b/src/util/util/email/index.ts index 8c7a848c..b9786e4f 100644 --- a/src/util/util/email/index.ts +++ b/src/util/util/email/index.ts @@ -27,7 +27,14 @@ import MailJet from "./transports/MailJet"; import SendGrid from "./transports/SendGrid"; import SMTP from "./transports/SMTP"; -const ASSET_FOLDER_PATH = path.join(__dirname, "..", "..", "..", "assets"); +const ASSET_FOLDER_PATH = path.join( + __dirname, + "..", + "..", + "..", + "..", + "assets", +); export const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; @@ -141,7 +148,7 @@ export const Email: { // loop through all replacements and replace them in the template for (const [key, value] of Object.values(replacements)) { if (!value) continue; - template = template.replace(key as string, value); + template = template.replaceAll(key as string, value); } return template; |