Skip to content

Commit 292a0f4

Browse files
juandavclaude
andcommitted
chore: add changeset for transport type fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 592874d commit 292a0f4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changeset/transport-type-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@nestjs-modules/mailer': patch
3+
---
4+
5+
Allow all transport types for additional transports and addTransporter method.

packages/mailer/dist/interfaces/mailer-options.interface.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface MailerOptions {
1212
defaults?: Options;
1313
transport?: TransportType;
1414
transports?: {
15-
[name: string]: SMTPTransport | SMTPTransport.Options | string;
15+
[name: string]: TransportType;
1616
};
1717
template?: {
1818
dir?: string;

packages/mailer/dist/mailer.service.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { SentMessageInfo } from 'nodemailer';
2-
import * as smtpTransport from 'nodemailer/lib/smtp-transport';
3-
import { MailerOptions } from './interfaces/mailer-options.interface';
2+
import { MailerOptions, TransportType } from './interfaces/mailer-options.interface';
43
import { MailerTransportFactory as IMailerTransportFactory } from './interfaces/mailer-transport-factory.interface';
54
import { ISendMailOptions } from './interfaces/send-mail-options.interface';
65
export declare class MailerService {
@@ -18,5 +17,5 @@ export declare class MailerService {
1817
private verifyTransporter;
1918
verifyAllTransporters(): Promise<boolean>;
2019
sendMail(sendMailOptions: ISendMailOptions): Promise<SentMessageInfo>;
21-
addTransporter(transporterName: string, config: string | smtpTransport | smtpTransport.Options): string;
20+
addTransporter(transporterName: string, config: TransportType): string;
2221
}

0 commit comments

Comments
 (0)