fix: only use cloud mailer client if creds exist

This commit is contained in:
Henry
2025-08-04 11:29:17 +01:00
parent 872a5fad28
commit e53ec868a5

View File

@@ -1,7 +1,9 @@
import Plunk from "@plunk/node";
export const cloudMailerClient =
process.env.NEXT_PUBLIC_KAN_ENV === "cloud"
process.env.NEXT_PUBLIC_KAN_ENV === "cloud" &&
process.env.PLUNK_API_KEY &&
process.env.PLUNK_API_URL
? new Plunk(process.env.PLUNK_API_KEY ?? "", {
baseUrl: process.env.PLUNK_API_URL,
})