- New sendEmail<T>() helper that extends BaseEmailData for full type safety
- Supports both template-based and direct HTML emails
- Automatic email validation and address parsing
- Merges template output with custom data fields
- Full TypeScript autocomplete for custom Email collection fields
- Updated README with comprehensive examples and API reference
- Exports BaseEmailData and SendEmailOptions types for external use
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- Remove all outdated API examples (sendEmail, scheduleEmail)
- Add comprehensive examples using new payload.create() approach
- Include template engine configuration options (LiquidJS, Mustache, custom)
- Add detailed migration guide from v0.0.x to v0.1.0
- Update feature list to highlight type safety and Payload integration
- Replace old API methods section with helper functions
- Add template syntax reference for all supported engines
- Update Recent Changes section with v0.1.0 breaking changes
The README now accurately reflects the simplified collection-based API
and provides clear migration paths for existing users.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced email customization documentation for the `emailWrapper` hook.
- Added examples for basic, advanced, and dynamic email layouts.
- Included guidelines for leveraging external CSS, assets, and template-specific layouts.
### 🔧 Improvements
- Updated `README.md` with detailed usage for consistent branding and responsive design in emails.
- Refined HTML structure and inline styles for improved readability and accessibility.
### 🛠 Maintenance
- Bumped version in `package.json` from `0.0.2` to `0.0.3`.