Skip to content

[Bug]: transporter.verify(...).then is not a function was not fixed in 2.0.0 #1172

@alwyn974

Description

@alwyn974

Describe the bug

transporter.verify(...).then is not a function TypeError: transporter.verify(...).then is not a function

As stated in the release changelog this bug was fixed in #1153
But in npm the code doesn't match the release https://www.npmjs.com/package/@nestjs-modules/mailer?activeTab=code
The fix is present in the tagged release

Promise.resolve(transporter.verify())

verifyTransporter(transporter, name) {
        const transporterName = name ? ` '${name}'` : '';
        transporter.verify()
            .then(() => this.mailerLogger.error(`Transporter${transporterName} is ready`))
            .catch((error) => this.mailerLogger.error(`Error occurred while verifying the transporter${transporterName}}: ${error.message}`));
    }

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