mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
Remove emailWrapper hook and all associated references.
- Simplified email sending logic by dropping custom layout wrapping. - Updated service, config, types, and readme to remove `emailWrapper` usage. - Retained focus on core email functionality while ensuring consistent formatting.
This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
import { Payload } from 'payload'
|
||||
import type { CollectionConfig, RichTextField, TypedCollection } from 'payload'
|
||||
import type { CollectionConfig, RichTextField } from 'payload'
|
||||
import { Transporter } from 'nodemailer'
|
||||
import {Email} from "../payload-types.js"
|
||||
|
||||
export interface EmailObject {
|
||||
to: string | string[]
|
||||
cc?: string | string[]
|
||||
bcc?: string | string[]
|
||||
from?: string
|
||||
replyTo?: string
|
||||
subject: string
|
||||
html: string
|
||||
text?: string
|
||||
variables?: Record<string, any>
|
||||
}
|
||||
|
||||
export type EmailWrapperHook = (email: EmailObject) => EmailObject | Promise<EmailObject>
|
||||
export type BaseEmail<TEmail = Email, TEmailTemplate = EmailTemplate> = Omit<TEmail, 'id' | 'template'> & {template: Omit<TEmailTemplate, 'id'>}
|
||||
|
||||
export type TemplateRendererHook = (template: string, variables: Record<string, any>) => string | Promise<string>
|
||||
|
||||
@@ -31,7 +20,6 @@ export interface MailingPluginConfig {
|
||||
queue?: string
|
||||
retryAttempts?: number
|
||||
retryDelay?: number
|
||||
emailWrapper?: EmailWrapperHook
|
||||
templateRenderer?: TemplateRendererHook
|
||||
templateEngine?: TemplateEngine
|
||||
richTextEditor?: RichTextField['editor']
|
||||
|
||||
Reference in New Issue
Block a user