-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
39 lines (31 loc) · 1.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// MOST Web Framework Codename Zero Gravity Copyright (c) 2017-2022, THEMOST LP All rights reserved
import { ConfigurationBase } from "@themost/common";
export interface MailHelperApplication {
getConfiguration(): ConfigurationBase
}
export interface MailHelperTemplateEngine {
render(templatePath: string, data: any, callback: (err?: Error, res?: any) => void): void;
}
export interface MailHelperContext {
application: MailHelperApplication;
engine(extension: string): MailHelperTemplateEngine
}
export declare class MailerHelper {
context: MailHelperContext | any;
constructor(context: MailHelperContext | any);
body(body: string): this;
text(text: string): this;
subject(subject: string): this;
from(sender: string): this;
replyTo(reply: string): this;
attachments(...attachment:string[]): this;
to(recipient: string): this;
transporter(opts: any): this;
test(value?: boolean): this;
cc(...cc: string[]): this;
bcc(...bcc: string[]): this;
template(template: string): this;
send(data: any, callback: (err?: Error, res?: any) => void): void;
sendAsync(data: any): Promise<any>;
}
export declare function getMailer(context: any): MailerHelper;