Skip to content

Email for professionals and teams

remove unnecessary env

Hieu Nguyen (Jack)00f311c39a52
diff --git a/.dev.vars.example b/.dev.vars.example
index 0dd06f4..ebef89a 100644
--- a/.dev.vars.example
+++ b/.dev.vars.example
@@ -1,20 +1,20 @@
-NEXTJS_ENV=development
# Preferred: scoped API token.
# This is an app runtime token, not the Cloudflare deploy/build token.
CF_TOKEN=your_api_token_with_zone_email_permissions
# Optional account id. Read by the database backup workflow.
-CF_AID=your_account_id
-CF_EMAIL_WORKER_NAME=mailflare
+# CF_AID=your_account_id
+# CF_EMAIL_WORKER_NAME=mailflare
# Optional: lets the admin dashboard trigger the GitHub update workflow.
-GITHUB_UPDATE_TOKEN=github_pat_with_actions_write
-GITHUB_UPDATE_REPO=owner/repo
-GITHUB_UPDATE_REF=main
+# GITHUB_UPDATE_TOKEN=github_pat_with_actions_write
+# GITHUB_UPDATE_REPO=owner/repo
+# GITHUB_UPDATE_REF=main
# Optional: required for manual and scheduled D1 database backups.
-D1_DATABASE_ID=your_d1_database_id
+# D1_DATABASE_ID=your_d1_database_id
+
# Omit this when CF_TOKEN also has permission to export the D1 database.
-D1_BACKUP_TOKEN=cloudflare_api_token_allowed_to_export_d1
+# D1_BACKUP_TOKEN=cloudflare_api_token_allowed_to_export_d1
# Legacy Global API Key alternative. Use this only instead of CF_TOKEN.
diff --git a/src/lib/cloudflare-api-utils.ts b/src/lib/cloudflare-api-utils.ts
index 441a361..d8bf0e9 100644
--- a/src/lib/cloudflare-api-utils.ts
+++ b/src/lib/cloudflare-api-utils.ts
@@ -60,8 +60,8 @@ export function getCloudflareAuthHint(errors: CfApiError[]) {
export function getEmailWorkerName(env: CloudflareEnv): string {
const workerName = env.CF_EMAIL_WORKER_NAME?.trim();
- if (!workerName) {
- throw new Error("CF_EMAIL_WORKER_NAME is required and must match the deployed Worker name.");
- }
- return workerName;
+ // if (!workerName) {
+ // throw new Error("CF_EMAIL_WORKER_NAME is required and must match the deployed Worker name.");
+ // }
+ return workerName || "mailflare";
}