Skip to content

Commit 55c5df6

Browse files
committed
refactor: improved the smtpConfig validation
1 parent 63f0c45 commit 55c5df6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/emails/src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ export class EmailClient {
6464
from: string;
6565
replyTo: string;
6666
}) {
67-
this.#client = config.smtpConfig ? nodemailer.createTransport(config.smtpConfig) : undefined;
67+
this.#client = config.smtpConfig?.host
68+
? nodemailer.createTransport(config.smtpConfig)
69+
: undefined;
6870
this.#imagesBaseUrl = config.imagesBaseUrl;
6971
this.#from = config.from;
7072
this.#replyTo = config.replyTo;

0 commit comments

Comments
 (0)