Page MenuHomeSealhub

message.ts
No OneTemporary

message.ts

import assert from "assert";
import type { App } from "../app/app.js";
export type MessageData = {
to: string;
subject: string;
html: string;
attachments: any[];
text: string;
};
export default class Message {
data: MessageData;
constructor(data: MessageData) {
assert(data.to);
assert(data.subject);
assert(data.html);
assert(
data.attachments === undefined || Array.isArray(data.attachments)
);
this.data = data;
}
async send(app: App) {
return app.mailer.send(this.data);
}
}

File Metadata

Mime Type
text/x-java
Expires
Sat, Nov 23, 01:18 (1 d, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
547767
Default Alt Text
message.ts (508 B)

Event Timeline