Comments (12)
Thanks, sorry for the delay, it is already fixed in 1.1.3 version
from mailer.
temporary fix.
from mailer.
Hello,
I have the same Problem.
In the new version is the ISendMailOptions required but there is no params for: To, Cc, Bcc, From.
See here:
import { SendMailOptions } from 'nodemailer';
export interface ISendMailOptions extends SendMailOptions {
template?: string;
context?: {
[name: string]: any;
};
}
So be careful to Update to the Nestjs version 6.x because the Mailer isn't working at the moment.
Any solutions?
from mailer.
@MegaphoneCA super strange I just removed the class for sendMailOptions:
// from
import { SentMessageInfo } from 'nodemailer';
/** Interfaces **/
import { MailerOptions } from './interfaces/mailer-options.interface';
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
export declare class MailerService {
private readonly mailerOptions;
private transporter;
constructor(mailerOptions: MailerOptions);
sendMail(sendMailOptions: ISendMailOptions): Promise<SentMessageInfo>;
}
// to
import { SentMessageInfo } from 'nodemailer';
/** Interfaces **/
import { MailerOptions } from './interfaces/mailer-options.interface';
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
export declare class MailerService {
private readonly mailerOptions;
private transporter;
constructor(mailerOptions: MailerOptions);
sendMail(sendMailOptions): Promise<SentMessageInfo>;
}
After reloading Nest App it should be working than.
After this you can add the Class to the Options and reload again and it still working.
Maybe it's a caching problem?
I uninstalled the Package and install it again and its still working.
How?
from mailer.
I'm confused, with your instructions... Can you clarify exactly what steps I need to take?
from mailer.
Go to the mailer.service.d.ts :
import { SentMessageInfo } from 'nodemailer';
/** Interfaces **/
import { MailerOptions } from './interfaces/mailer-options.interface';
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
export declare class MailerService {
private readonly mailerOptions;
private transporter;
constructor(mailerOptions: MailerOptions);
sendMail(sendMailOptions: ISendMailOptions): Promise<SentMessageInfo>;
}
In the sendMail function is the parameter sendMailOptions. This is from Type ISendMailOptions
Remove this at first, save the file and reload your application.
Now you shouldn't get any error.
Go again to this file and add ISendMailOptions
to the sendMailOptions.
sendMailOptions:ISendMailOptions
Save again and reload your application.
This works for me and all is working now.
Is that easier to understand?
from mailer.
That wasn't the part I found confusing. I am hoping for a fix that will be integrated into the project and not something I have to do myself.
Will the code you shared be integrated into the NPM version? If I change the code in my node_modules folder than it is only local and won't carry over to my production environment.
from mailer.
It's weird.
Because I change it and put it back again.
It looks like a bug but it would work.
So I don't know if or how you can fix something like that in an npm module.
Maybe this is just a temporary fix.
from mailer.
I've the same problem, and downgrade to v1.0.4 :D
from mailer.
i have a same issue here. hoping for documentation about the implementation.
export interface ISendMailOptions extends SendMailOptions {
template?: string;
context?: {
[name: string]: any;
};
}
from mailer.
temporary fix.
working temporary fix for sendmail options in NestJS V6, hope fix is added to support v6
from mailer.
@cdiaz thanks
from mailer.
Related Issues (20)
- callback is not called with the rendered data
- [request] make preview-email an optional peer dependency
- Upgrading breaks the installation somehow with error "[ERR_REQUIRE_ESM]" HOT 4
- Parameter substitution is not happening when using html string.
- Unhandled top level rejection with Handlebars Adapter
- Mail not sent on Production without error / info
- vm2 transitive dependency security vulnerability HOT 4
- ESM-Related Compilation Error After Installing Specific NestJS Packages HOT 3
- NodeMailer creates critical severity vulnerabilities after install HOT 6
- Send mail problem with render templates using Handlebars HOT 1
- Fix for partial not found error on windows due to glob.sync HOT 5
- Templates with handlebars are not processed - NestJS mailer send blank email HOT 10
- #CVE-2022-24999 in @nestjs-modules/[email protected] HOT 4
- Error: connect ECONNREFUSED 127.0.0.1:587 HOT 7
- Cannot destructure property 'templateName' of precompile nestjs nodemailetr
- Use subfolders of the template directory
- Import error using MjmlAdapter HOT 3
- Mjml fails to compile in adapter when using ejs engine HOT 1
- Update to Nest v10 HOT 4
- When support nestjs version ^10.0.0 is gonna get released? HOT 33
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailer.