Use with care: Blocked submissions are silently rejected without feedback to the user. Avoid short or generic terms that could match legitimate messages. For example, blocking "free" would also block "feel free to contact me".
Add blocked terms to your site/config/config.php:
return [
'philippoehrlein.kirby-email-manager.blacklist' => [
'casino',
'crypto investment',
'@tempmail.com',
'@guerrillamail.com',
],
];
The blacklist checks all form field values (case-insensitive) against the configured terms. If a match is found, the submission is silently rejected - the user sees a normal redirect without any error message, giving spammers no feedback.
When a submission is blocked, the form.blocked event is triggered:
'philippoehrlein.kirby-email-manager.webhooks.handlers' => [
'spamLogger' => function($event, $data) {
if ($event === 'form.blocked') {
// $data['reason'] = 'blacklist'
// $data['matched'] = 'casino' (the matched term)
// $data['data'] = [...] (form data)
}
}
]