Skip to content

Commit

Permalink
refactor: improved the smtpConfig validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Chigala committed Aug 23, 2023
1 parent 63f0c45 commit 55c5df6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/emails/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export class EmailClient {
from: string;
replyTo: string;
}) {
this.#client = config.smtpConfig ? nodemailer.createTransport(config.smtpConfig) : undefined;
this.#client = config.smtpConfig?.host
? nodemailer.createTransport(config.smtpConfig)
: undefined;
this.#imagesBaseUrl = config.imagesBaseUrl;
this.#from = config.from;
this.#replyTo = config.replyTo;
Expand Down

0 comments on commit 55c5df6

Please sign in to comment.