use named imports instead to avoid polluting the global namespace. in… (#8616)

* use named imports instead to avoid polluting the global namespace. in nodemailer

* Update packages/emails/templates/_base-email.ts

Lint fix.

* Revert yarn.lock changes

---------

Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
pull/8576/head
tony83033 2023-05-02 18:28:47 +05:30 committed by GitHub
parent 83d5176ddb
commit 28dcf69d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import { decodeHTML } from "entities";
import nodemailer from "nodemailer";
import { createTransport } from "nodemailer";
import { z } from "zod";
import type { Dayjs } from "@calcom/dayjs";
@ -52,9 +52,8 @@ export default class BaseEmail {
...(parseSubject.success && { subject: decodeHTML(parseSubject.data) }),
};
new Promise((resolve, reject) =>
nodemailer
.createTransport(this.getMailerOptions().transport)
new Promise((resolve, reject) =>
createTransport(this.getMailerOptions().transport)
.sendMail(payloadWithUnEscapedSubject, (_err, info) => {
if (_err) {
const err = getErrorFromUnknown(_err);