Add validation for beforeSend hook to ensure required properties remain intact

- Validate that 'from' field is not removed
- Validate that 'to' field is not removed or emptied
- Validate that 'subject' field is not removed
- Validate that at least 'html' or 'text' content exists
- Throw clear error messages if validation fails
- Bump version to 0.1.21
This commit is contained in:
2025-09-14 12:27:43 +02:00
parent 0d6d07de85
commit ea7d8dfdd5
4 changed files with 148 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-mailing",
"version": "0.1.20",
"version": "0.1.21",
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
"type": "module",
"main": "dist/index.js",