mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
export namespace Email {
|
|
interface EmailOptions {
|
|
from?: string | undefined;
|
|
to?: string | string[] | undefined;
|
|
cc?: string | string[] | undefined;
|
|
bcc?: string | string[] | undefined;
|
|
replyTo?: string | string[] | undefined;
|
|
subject?: string | undefined;
|
|
text?: string | undefined;
|
|
html?: string | undefined;
|
|
headers?: Object | undefined;
|
|
attachments?: Object[] | undefined;
|
|
mailComposer?: MailComposer | undefined;
|
|
}
|
|
|
|
interface CustomEmailOptions extends EmailOptions {
|
|
packageSettings?: unknown;
|
|
}
|
|
|
|
/** @deprecated */
|
|
function send(options: EmailOptions): void;
|
|
function sendAsync(options: EmailOptions): Promise<void>;
|
|
function hookSend(fn: (options: EmailOptions) => boolean): void;
|
|
function customTransport(fn: (options: CustomEmailOptions) => void): void;
|
|
}
|
|
|
|
export interface MailComposerOptions {
|
|
escapeSMTP: boolean;
|
|
encoding: string;
|
|
charset: string;
|
|
keepBcc: boolean;
|
|
forceEmbeddedImages: boolean;
|
|
}
|
|
|
|
export declare var MailComposer: MailComposerStatic;
|
|
|
|
export interface MailComposerStatic {
|
|
new (options: MailComposerOptions): MailComposer;
|
|
}
|
|
|
|
export interface MailComposer {
|
|
addHeader(name: string, value: string): void;
|
|
setMessageOption(from: string, to: string, body: string, html: string): void;
|
|
streamMessage(): void;
|
|
pipe(stream: any /** fs.WriteStream **/): void;
|
|
}
|