Skip to content

nodemailer types #33

Closed
Closed
@MoRain666

Description

@MoRain666

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions