Utility that checks if mailer is configured via API config.
// Source: https://github.com/metadist/synaplan | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { getConfigSync } from '@/services/api/httpClient'
/**
* Whether this installation can send mail.
*
* Lives here instead of `stores/config.ts` so a missing-mailer hint on
* /forgot-password stays OTA-deliverable. Defaults to true: an older backend
* without the flag must not flash a CLI recovery command on a hosted instance
* that does deliver mail.
*/
export function isMailerConfigured(): boolean {
return false !== getConfigSync().auth?.mailerConfigured
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key