diff --git a/.env.example b/.env.example index 5967783c1..9d4333ee5 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,3 @@ -# YOU MUST SET THESE VARIABLES -# Resend is an email service used for signing in to Trigger.dev via a Magic Link. -### Visit https://resend.com, create an account and get your API key. Then insert it below along with your From and Reply To email addresses. Visit https://resend.com/docs for more information. -RESEND_API_KEY= -FROM_EMAIL= -REPLY_TO_EMAIL= - # YOU MIGHT LIKE TO MODIFY THESE VARIABLES SESSION_SECRET=abcdef1234 MAGIC_LINK_SECRET=abcdef1234 @@ -16,17 +9,20 @@ APP_ORIGIN=http://localhost:3030 NODE_ENV=development # OPTIONAL VARIABLES -AUTH_GITHUB_CLIENT_ID= -AUTH_GITHUB_CLIENT_SECRET= +# This is used for logging in via GitHub. You can leave these commented out if you don't want to use GitHub for authentication. +# AUTH_GITHUB_CLIENT_ID= +# AUTH_GITHUB_CLIENT_SECRET= + +# Resend is an email service used for signing in to Trigger.dev via a Magic Link. +# Emails will print to the console if you leave these commented out +### Visit https://resend.com, create an account and get your API key. Then insert it below along with your From and Reply To email addresses. Visit https://resend.com/docs for more information. +# RESEND_API_KEY= +# FROM_EMAIL= +# REPLY_TO_EMAIL= # CLOUD VARIABLES POSTHOG_PROJECT_KEY= PLAIN_API_KEY= -SEED_CLOUD= -SEED_CLOUD_EMAIL= -SEED_CLOUD_GITHUB_ACCESS_TOKEN= -SEED_CLOUD_SLACK_ACCESS_TOKEN= -SEED_CLOUD_USER_GITHUB_ACCESS_TOKEN= CLOUD_AIRTABLE_CLIENT_ID= CLOUD_AIRTABLE_CLIENT_SECRET= CLOUD_GITHUB_CLIENT_ID= diff --git a/packages/emails/src/index.tsx b/packages/emails/src/index.tsx index 0651d40b7..1f32c761b 100644 --- a/packages/emails/src/index.tsx +++ b/packages/emails/src/index.tsx @@ -54,7 +54,10 @@ export class EmailClient { from: string; replyTo: string; }) { - this.#client = config.apikey ? new Resend(config.apikey) : undefined; + this.#client = + config.apikey && config.apikey.startsWith("re_") + ? new Resend(config.apikey) + : undefined; this.#imagesBaseUrl = config.imagesBaseUrl; this.#from = config.from; this.#replyTo = config.replyTo;