Skip to content

nodemailer types #33

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

Closed
MoRain666 opened this issue Apr 29, 2019 · 0 comments
Closed

nodemailer types #33

MoRain666 opened this issue Apr 29, 2019 · 0 comments

Comments

@MoRain666
Copy link

MoRain666 commented Apr 29, 2019

Error: Argument of type '{ to: string; replyTo: string; from: string; subject: string; template: string; context: { message: string; }; }' is not assignable to parameter of type 'ISendMailOptions'.
Object literal may only specify known properties, and 'replyTo' does not exist in type 'ISendMailOptions';

i found problem here ('/mailer/dist/interfaces/send-mail-options.interface.d.ts'):

import { SendMailOptions } from 'nodemailer';
export interface ISendMailOptions extends SendMailOptions {
    to?: string;
    from?: string;
    subject?: string;
    text?: string;
    html?: string;
    template?: string;
    context?: {
        [name: string]: any;
    };
}

The sendMailOptions interface does not exist.

Possible solution: It seems to me that you need to add @types/nodemailer in the package.json of your module

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 closed this as completed Feb 26, 2020
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