From 428a5f45cdab8b34f3c3fad41e418a65dc7e0724 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 13 Sep 2025 16:11:35 +0200 Subject: [PATCH 1/2] Fix TypeScript build error with payload email adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update transporter type to handle different email adapter interfaces - Add type casting for payload.email to resolve compatibility issues - Build now completes successfully without TypeScript errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/services/MailingService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/MailingService.ts b/src/services/MailingService.ts index 8353e1f..c76b1cd 100644 --- a/src/services/MailingService.ts +++ b/src/services/MailingService.ts @@ -15,7 +15,7 @@ import { serializeRichTextToHTML, serializeRichTextToText } from '../utils/richT export class MailingService implements IMailingService { private payload: Payload private config: MailingPluginConfig - private transporter!: Transporter + private transporter!: Transporter | any private templatesCollection: string private emailsCollection: string @@ -41,8 +41,8 @@ export class MailingService implements IMailingService { this.transporter = nodemailer.createTransport(this.config.transport as MailingTransportConfig) } } else if (this.payload.email && 'sendMail' in this.payload.email) { - // Use Payload's configured mailer - this.transporter = this.payload.email + // Use Payload's configured mailer (cast to any to handle different adapter types) + this.transporter = this.payload.email as any } else { throw new Error('Email transport configuration is required either in plugin config or Payload config') } From fa028ff5406b8bbd0e949579cd4907322e1e1404 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 13 Sep 2025 16:18:04 +0200 Subject: [PATCH 2/2] Bump package version to 0.0.6 in `package.json`. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78ea16c..9a28427 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xtr-dev/payload-mailing", - "version": "0.0.5", + "version": "0.0.6", "description": "Template-based email system with scheduling and job processing for PayloadCMS", "type": "module", "main": "dist/index.js",