🌳
pt0/serverF/emailF/getExceptionsEmailAI.mts
1import { getEnvConf } from '../envConfF.mts'
4export const getExceptionsEmail = () => {
5 const { exceptionsToEmail, exceptionsFromEmail } = getEnvConf() as Record<string, string | undefined>
6 const { secretVal } = getOptJsonSecretH('exceptionsImapSecretName' as any)
7 const derivedEmail = (secretVal as Record<string, any>)?.auth?.user as string | undefined
8 return {
9 exceptionsToEmail: exceptionsToEmail || derivedEmail,
10 exceptionsFromEmail: exceptionsFromEmail || derivedEmail,
11 }