import { Global, Module } from "@nestjs/common";
import { MailService } from "./mail.service";

/** Global so any feature module can inject MailService without re-importing.
 *  Matches the StorageService pattern: env-driven, null when unconfigured,
 *  and never blocks API boot. Notifications use it; renewals reuse it.
 *  ConfigService comes from the global ConfigModule in AppModule. */
@Global()
@Module({
  providers: [MailService],
  exports: [MailService],
})
export class MailModule {}
