ERROR [MailerService] Transporter is ready. Nest.js. @nestjs-modules/mailer

2.2k Views Asked by At

In the terminal, an error occurs: [Nest] 21016 - 05.03.2024, 19:05:42 ERROR [MailerService] Transporter is ready. Emails are being sent. I don't know what the problem is, I need help.

The code has been checked, there are no errors.enter image description here

5

There are 5 best solutions below

6
huy19th On BEST ANSWER

Using latest version of @nestjs-modules/mailer will log this error in terminal so i'm using version 1.10.3 instead.

0
Joao Demate On

Are working to fix this issue :)

https://github.com/nest-modules/mailer/issues/1131

0
JEEVANANTHAM M On

See the solution in this Link

Path: lib/mailer.service.ts

private verifyTransporter(transporter: Transporter, name?: string): void {
const transporterName = name ?  '${name}' : '';
transporter.verify()
.then(() => this.mailerLogger.error(Transporter${transporterName} is ready))

.then(() => this.mailerLogger.error(Transporter${transporterName} is ready))

change it to

 ✅.then(() => this.mailerLogger.log(Transporter${transporterName} is ready))

Changes: image for changes

Output: Corrected Issue

0
Vinay On

my version: "@nestjs-modules/mailer": "^1.11.2",

I fixed it this way Path: node_modules/@nestjs-modules/mailer/dist/mailer.service.js

I changed then(() => this.mailerLogger.error(Transporter${transporterName} is ready)) to then(() => this.mailerLogger.log(Transporter${transporterName} is ready))

0
Jayanth On

simply downgrade the latest version ( 1.11.2 ) to ( 1.10.3 )

npm i @nestjs-modules/[email protected]