mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
✨ FEATURE: Add PayloadCMS task for queuing template emails
- Add sendTemplateEmailTask with comprehensive input schema - Support template rendering, email parsing, and scheduling - Include TypeScript interface SendTemplateEmailInput for type safety - Add task to exports for easy import and usage - Support custom email collection fields via extensible input - Add comprehensive documentation with usage examples Users can now: ✅ Import and add task to their Payload jobs configuration ✅ Queue emails programmatically via payload.jobs.queue() ✅ Use admin panel form interface for manual email queuing ✅ Get full TypeScript support with proper input types ✅ Extend with custom fields from their email collection Example usage: ```typescript import { sendTemplateEmailTask } from '@xtr-dev/payload-mailing' // Add to Payload config export default buildConfig({ jobs: { tasks: [sendTemplateEmailTask] } }) // Queue from code await payload.jobs.queue({ task: 'send-template-email', input: { templateSlug: 'welcome', to: ['user@example.com'], variables: { name: 'John' } } }) ``` 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@xtr-dev/payload-mailing",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
Reference in New Issue
Block a user