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

1.1.3 broke passing Address type objects in from/to/cc/etc... #34

Closed
dantman opened this issue Apr 29, 2019 · 1 comment
Closed

1.1.3 broke passing Address type objects in from/to/cc/etc... #34

dantman opened this issue Apr 29, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@dantman
Copy link
Contributor

dantman commented Apr 29, 2019

This patch release change is actually a bug/breaking change.

Mail.Options includes from?: string | Address;, to?: string | Address | Array<string | Address>;, etc... but this change locks the options down so that only strings are accepted.

Before this patch release I had code with from: { name: 'My Site', address: this.confirmEmail }, which after upgrading now instead emits a TypeScript error of Type '{ name: string; address: string; }' is not assignable to type 'string'.

@boenrobot
Copy link

Agree. There is no reason to restrict the from and to like that.

IMHO, this commit should be undone.

sdgoij added a commit to sdgoij/nestjs-nodemailer that referenced this issue Sep 24, 2019
…Options

SendMailOptions extends nodemailer.SendMailOptions (alias of nodemailer.Mail.Options[1]) so it inherits all properties defined there.

Addresses issue nest-modules#33 and nest-modules#34

1. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/nodemailer/lib/mailer/index.d.ts#L96
sdgoij added a commit to sdgoij/nestjs-nodemailer that referenced this issue Sep 24, 2019
…Options

SendMailOptions extends nodemailer.SendMailOptions (alias of nodemailer.Mail.Options[1]) so it inherits all properties defined there.

Addresses issue nest-modules#33 and nest-modules#34

1. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/nodemailer/lib/mailer/index.d.ts#L96
@juandav juandav added the bug Something isn't working label Mar 7, 2020
@juandav juandav closed this as completed Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants