diff options
author | Raphael Kabo <raphaelkabo@hey.com> | 2024-07-01 19:50:25 +0100 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@hey.com> | 2024-07-01 19:50:25 +0100 |
commit | c5141c77976cd17e5e457ac0d1fb6647636056bb (patch) | |
tree | a7541fcf4db51072435f86608cf0c897341ca74a | |
parent | 935bb9dec49f2a18bb839915dbc1ff695f8767c5 (diff) |
Allow 'none' as an email option
-rw-r--r-- | config/config.example.toml | 2 | ||||
-rw-r--r-- | src/lib/config.ts | 4 | ||||
-rw-r--r-- | src/lib/email.ts | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/config/config.example.toml b/config/config.example.toml index 5502038..d58fe35 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -22,7 +22,7 @@ show_public_event_list = false # Which mail service to use to send emails to hosts and attendees. Options are # 'nodemailer' or 'sendgrid'. Configure settings for this mail # service below. -mail_service = "nodemailer" +mail_service = "none" # An array of email addresses which are permitted to create events. If this is # empty, anyone can create events. # For example: diff --git a/src/lib/config.ts b/src/lib/config.ts index b4086d8..e8b774a 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -21,7 +21,7 @@ export interface GathioConfig { email_logo_url: string; show_kofi: boolean; show_public_event_list: boolean; - mail_service: "nodemailer" | "sendgrid"; + mail_service: "nodemailer" | "sendgrid" | "none"; creator_email_addresses: string[]; }; database: { @@ -62,7 +62,7 @@ const defaultConfig: GathioConfig = { email_logo_url: "", show_public_event_list: false, show_kofi: false, - mail_service: "nodemailer", + mail_service: "none", creator_email_addresses: [], }, database: { diff --git a/src/lib/email.ts b/src/lib/email.ts index 9b8162b..3cf3156 100644 --- a/src/lib/email.ts +++ b/src/lib/email.ts @@ -66,6 +66,7 @@ export const initEmailService = async (): Promise<boolean> => { "Error verifying Nodemailer transporter. Please check your Nodemailer configuration.", ); } + case "none": default: console.warn( "You have not configured this Gathio instance to send emails! This means that event creators will not receive emails when their events are created, which means they may end up locked out of editing events. Consider setting up an email service.", |