From 02e5950e01ac11ff6ee00a7fec0b9dd2b41b3da3 Mon Sep 17 00:00:00 2001 From: juandav Date: Thu, 19 Mar 2020 16:16:50 -0500 Subject: [PATCH] fix(): sendMail options errors #85 --- lib/interfaces/send-mail-options.interface.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/interfaces/send-mail-options.interface.ts b/lib/interfaces/send-mail-options.interface.ts index 718a280b..a2a13810 100644 --- a/lib/interfaces/send-mail-options.interface.ts +++ b/lib/interfaces/send-mail-options.interface.ts @@ -1,6 +1,31 @@ import { SendMailOptions } from 'nodemailer'; +export type TextEncoding = 'quoted-printable' | 'base64'; +export type Headers = + | { [key: string]: string | string[] | { prepared: boolean; value: string } } + | Array<{ key: string; value: string }>; + +export interface Address { + name: string; + address: string; +} + export interface ISendMailOptions extends SendMailOptions { + to?: string | Address | Array; + cc?: string | Address | Array; + replyTo?: string | Address; + inReplyTo?: string | Address; + from?: string | Address; + subject?: string; + text?: string | Buffer; + html?: string | Buffer; + sender?: string | Address; + raw?: string | Buffer; + textEncoding?: TextEncoding; + references?: string | string[]; + encoding?: string; + date?: Date | string; + headers?: Headers; context?: { [name: string]: any; };