Ivanova Yuila
Ivanova Yuila

Reputation: 83

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

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

Upvotes: 8

Views: 7122

Answers (5)

huy19th
huy19th

Reputation: 122

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

Update
This issue has been fixed since version 2.0.2

Upvotes: 10

Jayanth MKV
Jayanth MKV

Reputation: 323

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

npm i @nestjs-modules/[email protected]

Upvotes: 1

Vinay
Vinay

Reputation: 1

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))

Upvotes: 0

JEEVANANTHAM M
JEEVANANTHAM M

Reputation: 21

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

Upvotes: 2

Joao Demate
Joao Demate

Reputation: 53

Are working to fix this issue :)

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

Upvotes: 2

Related Questions