Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISendMailOptions type does not match with nodemailer #104

Closed
gaara4896 opened this issue Mar 30, 2020 · 0 comments
Closed

ISendMailOptions type does not match with nodemailer #104

gaara4896 opened this issue Mar 30, 2020 · 0 comments

Comments

@gaara4896
Copy link

In send-mail-options.interface.ts, below code can be found

export interface ISendMailOptions extends SendMailOptions {
  ...
  text?: string | Buffer;
  ...
}

Below are obtain from original nodemailer doc, original source from https://nodemailer.com/message/

text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…’})

Text should be able to take in attachment-like object, instead of just string or Buffer.

I suggest the type to be updated to as below


export interface AttachmentLikeObject {
  path: string;
}

export interface ISendMailOptions extends SendMailOptions {
  ...
  text?: string | Buffer | AttachmentLikeObject;
  ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants