import { Attachment } from 'nodemailer/lib/mailer'; import { DyFM_AnyError, DyFM_Error_Settings } from '@futdevpro/fsm-dynamo'; export interface DyNTS_EmailService_Settings { host: string; port: number; email: string; pass: string; senderName: string; rootPath: string; templateComponents?: DyNTS_EmailTemplateComponent[]; } export declare class DyNTS_EmailTemplateComponent { name: string; selector: string; templatePath?: string; template?: string; stylePath?: string; styles?: string; headerLinks?: string; properties?: string[]; subComponentSelectors?: string[]; constructor(set?: DyNTS_EmailTemplateComponent); } export interface DyNTS_SendEmail_Settings { to: string; subject: string; /** direct email content, if provided, this will be used */ content?: string; templateComponentName?: string; templateProperties?: T; attachments?: Attachment[]; } /** * */ export declare class DyNTS_EmailService { serviceName: string; private readonly nmTransporter; private readonly senderName; private readonly senderNEmail; private readonly components; private readonly componentsBySelector; private readonly componentsByName; private readonly styleLimitWarning; readonly defaultErrorUserMsg: string; constructor(set: DyNTS_EmailService_Settings); asyncPostConstruct(): Promise; /** * * @param set */ sendEmail(set: DyNTS_SendEmail_Settings, issuer: string): Promise; private compileTemplateComponent; private compileHTMLMainFrame; /** trims all rows and remove everything between /*...*\/ */ private styleTrim; /** removes HTML comments */ private templateTrim; private getStringKBSize; private compileComponentProperties; private compileSubComponent; private loadEmailTemplateComponent; private readFile; private connectComponents; /** * * @param template * @returns */ private getTemplatePropertyKeys; private _getDefaultErrorSettings; protected getDefaultErrorSettings(fnName: string, error: DyFM_AnyError, issuer: string, /** @deprecated we wont support the separate user message in the future, use the message instead */ useMessageAsUserMessage?: boolean): DyFM_Error_Settings; } //# sourceMappingURL=email.service.d.ts.map