swaf/src/components/MailComponent.ts

14 lines
393 B
TypeScript
Raw Normal View History

2020-04-22 15:52:17 +02:00
import ApplicationComponent from "../ApplicationComponent";
import {Express} from "express";
2020-04-22 15:52:17 +02:00
import Mail from "../Mail";
export default class MailComponent extends ApplicationComponent<void> {
public async start(app: Express): Promise<void> {
2020-04-22 15:52:17 +02:00
await this.prepare('Mail connection', () => Mail.prepare());
}
public async stop(): Promise<void> {
Mail.end();
}
}