Something went wrong. Try again.
A self-hosted web platform for applications & services with design based on Google's Material 3 Expressive. (Work In Progress)
Something went wrong. Try again.
123456789101112131415161718192021222324import * as nm from "nodemailer";import type { Instance } from "../index.ts";import System from "../system.ts";
export default class EmailSystem extends System { transporter!: nm.Transporter;
constructor(instance: Instance) { super("email", instance); }
override async startup(): Promise<boolean> { this.transporter = nm.createTransport(this.instance.sys.configuration.mailServer);
try { this.log.info(`Connecting to ${this.instance.sys.configuration.mailServer.host}:${this.instance.sys.configuration.mailServer.port}...`); await this.transporter.verify(); return true; } catch (err) { return false; } }}