We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fa5f9d commit a75df38Copy full SHA for a75df38
1 file changed
packages/hocuspocus.server/src/lib/email.ts
@@ -66,10 +66,16 @@ export const sendEmail = async (params: SendEmailParams): Promise<boolean> => {
66
67
/**
68
* Sends notification email when a new document is created
69
+ * Only sends in production environment to avoid noise during development
70
*/
71
export const sendNewDocumentNotification = async (
72
params: NewDocumentEmailParams
73
): Promise<boolean> => {
74
+ if (process.env.NODE_ENV !== 'production') {
75
+ emailLogger.debug('Skipping new document notification (non-production environment)')
76
+ return false
77
+ }
78
+
79
const notificationEmails = process.env.NEW_DOCUMENT_NOTIFICATION_EMAILS
80
81
if (!notificationEmails) {
0 commit comments