Skip to content

Commit

Permalink
Allow 'none' as an email option
Browse files Browse the repository at this point in the history
  • Loading branch information
lowercasename committed Jul 1, 2024
1 parent 935bb9d commit c5141c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit c5141c7

Please sign in to comment.